From 32a3e1f26ccc9252e69963fdef69b68a5b7f641a Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Tue, 28 Jan 2020 16:52:46 +0300 Subject: [PATCH] investigating bug... Signed-off-by: Alex A. Naanou --- ui (gen4)/features/ui-widgets.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ui (gen4)/features/ui-widgets.js b/ui (gen4)/features/ui-widgets.js index 58a4b9fd..df169bb9 100755 --- a/ui (gen4)/features/ui-widgets.js +++ b/ui (gen4)/features/ui-widgets.js @@ -1278,12 +1278,15 @@ function(spec, callback){ mode) }) // reset the callback on update... // XXX this does not work yet... + // there seem to be two problems here: + // - 'update' is triggered on first draw, thus + // triggering .off(..)... + // ...this should lead to the callback(..) not + // being called at all -- see next issue... + // - .off(..) for some reason does not work... .one('update', function(){ - // XXX I'd expect to see cb(..) not getting called - // at all (as .update(..) is called on first draw) but - // it does not get unbound... // XXX BUG? this.off(..) will not work with non-standard events... - this.dom.off('close', cb) }) + this.dom.off('close', cb) }) }) return this }