diff options
| author | Nicolas Lempereur <nle@odoo.com> | 2015-08-27 08:32:31 +0200 |
|---|---|---|
| committer | Nicolas Lempereur <nle@odoo.com> | 2015-08-27 13:17:00 +0200 |
| commit | e2930e19a025fff05069fbfb0c5b18eb75e0d56a (patch) | |
| tree | 152a417b5c443265daee67d0bb75ae7c97ae9f83 /addons/web/static/src | |
| parent | 0c4905738e301daced6fa313c32843de7f5a8bcb (diff) | |
[FIX] web: glitch with scroll and list editable
On a first edition of a view list editable, scrolling before the first
edition might cause an issue: the editing fields are higher than they
should.
This commit solves this.
This issue stems from jQuery .offset({value}) function which is broken
if the element we want to position:
- is in absolute postionning,
- is inside a scrolled element in non static positionning,
- has not both top and left css property setted,
- has no ancestor element between itself and the scrolled not in static
positionning.
This issue happens less (and probably not at all) in saas-6 since the
last condition is most often not met thanks to this change:
https://github.com/odoo/odoo/commit/1ccd87a#diff-27c072074221456684bfc5f150ca0bc9R876
This issue of jquery is solved since jquery 3.0.0-alpha1:
https://github.com/jquery/jquery/commit/2d71594
( the issue is shown in https://jsfiddle.net/wpjrnggf/ and we can see it
is solved with jQuery 3.0.0-alpha1 https://jsfiddle.net/L6ykpjgy/ )
closes #8251
opw-647622
Diffstat (limited to 'addons/web/static/src')
| -rw-r--r-- | addons/web/static/src/js/view_list_editable.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/static/src/js/view_list_editable.js b/addons/web/static/src/js/view_list_editable.js index a0a2010d5cc..8c3f7d09ada 100644 --- a/addons/web/static/src/js/view_list_editable.js +++ b/addons/web/static/src/js/view_list_editable.js @@ -301,7 +301,7 @@ var $cell = $(cell); field.set_dimensions($cell.outerHeight(), $cell.outerWidth()); - field.$el.position({ + field.$el.css({top: 0, left: 0}).position({ my: 'left top', at: 'left top', of: $cell |
