Do not bind twice keydown event on key_press method
The event is already binded in the Form widget so the EditableTree widget does not need to bind it again otherwise the callback is called twice per event. issue8429 review255571002
This commit is contained in:
@@ -2154,7 +2154,6 @@
|
||||
init: function(view, attributes) {
|
||||
Sao.View.EditableTree.Many2One._super.init.call(
|
||||
this, view, attributes);
|
||||
this.el.on('keydown', this.key_press.bind(this));
|
||||
},
|
||||
key_press: function(event_) {
|
||||
if (event_.which == Sao.common.TAB_KEYCODE) {
|
||||
@@ -2171,7 +2170,6 @@
|
||||
init: function(view, attributes) {
|
||||
Sao.View.EditableTree.Reference._super.init.call(
|
||||
this, view, attributes);
|
||||
this.el.on('keydown', this.key_press.bind(this));
|
||||
},
|
||||
key_press: function(event_) {
|
||||
if (event_.which == Sao.common.TAB_KEYCODE) {
|
||||
@@ -2188,7 +2186,6 @@
|
||||
init: function(view, attributes) {
|
||||
Sao.View.EditableTree.One2One._super.init.call(
|
||||
this, view, attributes);
|
||||
this.el.on('keydown', this.key_press.bind(this));
|
||||
},
|
||||
key_press: function(event_) {
|
||||
if (event_.which == Sao.common.TAB_KEYCODE) {
|
||||
|
||||
Reference in New Issue
Block a user