[FIX] compute the correct offset to adjust view
the jquery method length() compute the height of its element, even if it is diplay:none. But in our case, we want the offset to be zero if there is no visible view_manager_header. (for example, general settings in settings menu)
This commit is contained in:
@@ -649,7 +649,7 @@ instance.web.SearchView = instance.web.Widget.extend(/** @lends instance.web.Sea
|
||||
// divs).
|
||||
adjust_view_top: function () {
|
||||
if (this.$view_manager_header.length) {
|
||||
var height = this.$view_manager_header.height() + 1;
|
||||
var height = this.$view_manager_header[0].offsetHeight + 1;
|
||||
this.$view_manager_header.next().css('top', height + 'px');
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user