[FIX] prevent an incorrect state in autocompletion
When going up and wrapping around, the focus was on a hidden separator, so hitting enter = stacktrace. Now, the focus goes on the last selectable list item.-
This commit is contained in:
parent
9132b1d306
commit
4ab85f2fb3
|
@ -2505,7 +2505,7 @@ instance.web.search.AutoComplete = instance.web.Widget.extend({
|
|||
if (!$next.length) $next = this.$('li:first-child');
|
||||
} else {
|
||||
$next = this.$('li.oe-selection-focus').prevAll(':not(.oe-separator)').first();
|
||||
if (!$next.length) $next = this.$('li:last-child');
|
||||
if (!$next.length) $next = this.$('li:not(.oe-separator)').last();
|
||||
}
|
||||
this.focus_element($next);
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue