Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MultiSelect's OptionsMenu Does Not Fire a CloseEvent Consistently Upon Closing #1018

Closed
Ri-gers opened this issue Mar 7, 2025 · 6 comments
Closed
Assignees
Milestone

Comments

@Ri-gers
Copy link

Ri-gers commented Mar 7, 2025

MultiSelect<String> testSelect = MultiSelect.<String>create();
testSelect.getOptionsMenu().setAutoCloseOnSelect(false).setCloseOnBlur(true)
                .addCloseListener(component ->  GWT.log("CLOSED"));
for (int i = 0; i < 100; i++)
{
     testSelect.appendChild(SelectOption.create("Entry " + i));
}

The CloseEvent is not fired consistently in the above code. It seems to only happen if there are 'a lot' of options appended to the component. So, de/selecting items and clicking outside of the OptionsMenu does not always result in a CloseEvent fired. This seems to get worse the more items are in the menu

@vegegoku vegegoku self-assigned this Mar 8, 2025
@vegegoku vegegoku added the bug Something isn't working label Mar 8, 2025
@github-project-automation github-project-automation bot moved this to To do in Domino UI Mar 8, 2025
@vegegoku vegegoku added performance and removed bug Something isn't working labels Mar 8, 2025
@vegegoku vegegoku added this to the 2.0.4 milestone Mar 8, 2025
@vegegoku
Copy link
Member

vegegoku commented Mar 11, 2025

I still cant reproduce this one, the close listener is being triggered consistently for me. Any more hints on how to reproduce this?

@Ri-gers
Copy link
Author

Ri-gers commented Mar 12, 2025

I still cant reproduce this one, the close listener is being triggered consistently for me. Any more hints on how to reproduce this?

Hmm, for me it happens with a low number of items and gets very consistent when e.g. using 1000 items (in general: the more items, the more consistently this happens). I simply open the dropdown, select an item and click outside of the dropdown to close it, then repeat this. This results in "CLOSED" not being printed to the log everytime (in my case, once the user would select some values, a call to the server would be triggered using the selected values which then in turn update some other fields in a form. Since this is often some expensive call, I only do it once the close event is fired. ChangeEvent works consistenly by the way, but I cannot use that because of the expensive calculation, that's the reason I rely on CloseEvents to collect the final user selection).

Can you reproduce it using more items (500, 1000, etc.)? Then it should happen very consistently. Two more notes: I'm mainly closing the dropdown by clicking outside of it, not using ESC and not clicking on the MultiSelect component. I'm using Chrome, so I'm not sure if your findings from #1017 might have an influence here. Also keep in mind that I'm using the last release build 2.0.3. Maybe some fixes you implemented for 2.0.4 (like #976) make this obsolete. If you cannot reproduce it, can you release 2.0.4 so that I can check again with all the changes?

@Ri-gers
Copy link
Author

Ri-gers commented Mar 14, 2025

@vegegoku Could you reproduce it with my hints?

@vegegoku
Copy link
Member

I actually tested with 3000 items. Can you test with SNAPSHOTS?

@vegegoku
Copy link
Member

This is with 1500 select options and I still cant reproduce, I will close the issue assuming it was fixed automatically from a different fix.

Screencast.from.2025-03-19.13-40-53.webm

@github-project-automation github-project-automation bot moved this from To do to Done in Domino UI Mar 19, 2025
@Ri-gers
Copy link
Author

Ri-gers commented Mar 20, 2025

Seems to fire consistently now, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants