button with popup menu

I can NOT reproduce with a little snippet yet (working on it, but we don’t have 5.3.0 PRO in webix snippet website at the moment).

It’s about a simple button triggering a popup with menu inside. 5.2.4 PRO: OK, 5.3.0: KO. Details below.

If i enable webix.debug, here the result between 5.2.4 PRO and 5.3.0 PRO

5.2.4 PRO (work as expected)

[button@usermenu] event:onfocus
webix_debug.js:496 (2) [result, null]
webix_debug.js:491 [core@undefined] event:onfocuschange
webix_debug.js:496 (2) [result, null]
webix_debug.js:491 [core@undefined] event:onclick
webix_debug.js:496 [MouseEvent]
webix_debug.js:491 [menu@$menu2] event:onbeforeload
webix_debug.js:496 []
webix_debug.js:491 [DataStore@undefined] event:onparse
webix_debug.js:496 (2) [{…}, Array(3)]
webix_debug.js:491 [DataStore@undefined] event:onstoreload
webix_debug.js:496 (2) [{…}, Array(3)]
webix_debug.js:491 [DataStore@undefined] event:onstoreupdated
webix_debug.js:496 (3) [null, null, null]
webix_debug.js:491 [menu@$menu2] event:onbeforerender
webix_debug.js:496 [w…x.DataStore]
webix_debug.js:491 [menu@$menu2] event:onitemrender
webix_debug.js:496 [{…}]
webix_debug.js:491 [menu@$menu2] event:onitemrender
webix_debug.js:496 [{…}]
webix_debug.js:491 [menu@$menu2] event:onitemrender
webix_debug.js:496 [{…}]
webix_debug.js:491 [menu@$menu2] event:onafterrender
webix_debug.js:496 []
webix_debug.js:491 [menu@$menu2] event:onafterload
webix_debug.js:496 []
webix_debug.js:491 [popup@undefined] event:onhide
webix_debug.js:496 []
webix_debug.js:491 [popup@$popup3] event:onbeforeshow
webix_debug.js:496 Arguments(3) [button.webix_img_btn, null, true, callee: ƒ, Symbol(Symbol.iterator): ƒ]
webix_debug.js:491 [button@usermenu] event:onblur
webix_debug.js:496 [result]
webix_debug.js:491 [popup@$popup3] event:onfocus
webix_debug.js:496 (2) [result, result]
webix_debug.js:491 [core@undefined] event:onfocuschange
webix_debug.js:496 (2) [result, result]
webix_debug.js:491 [popup@$popup3] event:onshow
webix_debug.js:496 []
webix_debug.js:491 [button@usermenu] event:onitemclick
webix_debug.js:496 (2) ["usermenu", MouseEvent]
webix_debug.js:491 [compagnon_sidebar@sidebar] event:onmouseout
webix_debug.js:496 [MouseEvent]

5.3.0 PRO (broken, popup not shown, error in console)

[button@usermenu] event:onfocus
webix_debug.js:496 (2) [result, null]
webix_debug.js:491 [core@undefined] event:onfocuschange
webix_debug.js:496 (2) [result, null]
webix_debug.js:491 [core@undefined] event:onclick
webix_debug.js:496 [MouseEvent]
webix_debug.js:491 [menu@$menu2] event:onbeforeload
webix_debug.js:496 []
webix_debug.js:491 [DataStore@undefined] event:onparse
webix_debug.js:496 (2) [{…}, Array(3)]
webix_debug.js:491 [DataStore@undefined] event:onstoreload
webix_debug.js:496 (2) [{…}, Array(3)]
webix_debug.js:491 [DataStore@undefined] event:onstoreupdated
webix_debug.js:496 (3) [null, null, null]
webix_debug.js:491 [menu@$menu2] event:onbeforerender
webix_debug.js:496 [w…x.DataStore]
webix_debug.js:491 [menu@$menu2] event:onitemrender
webix_debug.js:496 [{…}]
webix_debug.js:491 [menu@$menu2] event:onitemrender
webix_debug.js:496 [{…}]
webix_debug.js:491 [menu@$menu2] event:onitemrender
webix_debug.js:496 [{…}]
webix_debug.js:491 [menu@$menu2] event:onafterrender
webix_debug.js:496 []
webix_debug.js:491 [menu@$menu2] event:onafterload
webix_debug.js:496 []
webix_debug.js:491 [popup@undefined] event:onhide
webix_debug.js:496 []
webix_debug.js:491 [popup@$popup3] event:onbeforeshow
webix_debug.js:496 Arguments(3) [button.webix_img_btn, null, true, callee: ƒ, Symbol(Symbol.iterator): ƒ]
webix_debug.js:7847 Uncaught TypeError: Cannot read property '0' of undefined
    at result.show (webix_debug.js:7847)
    at Object.<anonymous> (webix_debug.js:8929)
    at Object.callEvent (webix_debug.js:575)
    at HTMLBodyElement.<anonymous> (webix_debug.js:1121)

In the source code of 5.3.0 (webix_debug, line 7829), the variable this._last_size is undefined.

In the source code of 5.2.4 (webix_debug, line 7790), the variable this._last_size contain an array.

Btw, should be great to have 5.3.0 PRO in snippet GUI.

Hi,

Thank you for reporting, but we are unable to reproduce the issue according to your description: https://snippet.webix.com/e7n2gkw1

By the way, the snippet tool loads Webix 5.3 already, it is just not reflected in its UI. We will update it shortly.

Good to know for 5.3 in webix snippet tool. Perfect. I must go deeper in the test case, let’s keep in touch.

Kind of race condition in my own code, for sure.

The workaround found (dirty hack) is to show and hide the underlying popup menu as soon as possible in a lazy loading webix app context.