From a8f94a59cde1c4034b1a704014d1572598db833f Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Tue, 9 Dec 2014 14:38:12 +0100 Subject: [PATCH] [FIX] web: scroll handling for many2one selection If the many2one selection height was too big (bigger than the browser page), it wasn't possible to see all options, because the body is set as overflow: hidden; Moreover, if you opened a many2one selection and then scrolled the page, the selection moved with the scrolling, while it should be sticked to its input field --- addons/web/static/src/css/base.css | 1 + addons/web/static/src/css/base.sass | 1 + addons/web/static/src/js/view_form.js | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index aa48fd3639f..d448bb38188 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -3064,6 +3064,7 @@ div.ui-widget-overlay { } .ui-menu .ui-menu-item a { padding: 1px 16px; + color: #404040; } .ui-menu .ui-menu-item a.ui-corner-all { -moz-border-radius: 0; diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index 908ad90c890..b8132d68d9c 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -2490,6 +2490,7 @@ div.ui-widget-overlay padding: 0 a padding: 1px 16px + color: #404040 a.ui-corner-all @include radius(0) a.ui-state-active diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 5295942aa95..e6cae5df4a0 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -3734,7 +3734,8 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc // disabled to solve a bug, but may cause others //close: anyoneLoosesFocus, minLength: 0, - delay: 250 + delay: 250, + appendTo: '.oe_view_manager_body' }); // set position for list of suggestions box this.$input.autocomplete( "option", "position", { my : "left top", at: "left bottom" } );