changeset 8213755135ee in sao:5.2
details: https://hg.tryton.org/sao?cmd=changeset;node=8213755135ee
description:
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
(grafted from 314bc519d00e9fc9b2bc2a2e5d946067935972be)
diffstat:
src/view/tree.js | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 3bc0867dcde1 -r 8213755135ee src/view/tree.js
--- a/src/view/tree.js Wed Jun 12 19:08:46 2019 +0200
+++ b/src/view/tree.js Thu Jun 20 23:15:06 2019 +0200
@@ -2123,7 +2123,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) {
@@ -2140,7 +2139,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) {
@@ -2157,7 +2155,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) {