Bug with list and onBeforeSelect, return false does not seem to prevent selection

Hello!

I have a weird behavior with a list multiselect and onBeforeSelect event. When selecting a range of items with Shift key, selection occurr even if false is returned.

What I’m trying to achieve is to prevent the selection when a form on the page is dirty.

To repro with this snippet Code Snippet

  1. Select the first item
    o UI shows the first item selected
  2. Click the “getSelectedId(true)” button
    o Alert shows “1”
  3. Press and hold the Shift Key, and clic the 5th item
    o UI shows the first item selected
  4. Click the “getSelectedId(true)” button
    o Alert shows “1,2,3,4,5”, which is wrong (UI shows only first item selected)

NOTE: I simplified the snippet to keep only the erratic behavior, and I know my snippet

Hello @GoofyB ,
I can confirm the bug with Shift and selection.
Thank you for such a detailed report!

1 Like

It seems to be fixed as of Webix version 10.0.
Thanks
=o)