I am using the UI Toolkit Version 1.0.0-preview.3 with Unity 2020.1.0b13.
We have our own implementation of dropdown which uses a button and then toggles a list view panel when the button is clicked.
Unfortunately when we click on the button the click is executed twice which causes are dropdown to never open (because the initial state is off for the list).
Are you applying even hook to each button AND the dropdown itself? I recommened using one top-level even hook and parse the event.target there for all events for that element container.
Otherwise, taking big leap of assumption, I’m guessing when you click button the event later also being propagated to dropdown which causes it it close? See if adding StopPropagate will help
Are you sure the event is triggered twice? I had similar issue and it turned out style.display returned null the first time I checked it. I solved it by using resolvedStyle instead.
Hey @Kan15hkSMT , we found a bug recently that sounds like what you’re describing. If you use the latest Unity 2020.1 (that was just announced) without the UI package you won’t have issues, and there should be a new version of the UI package containing the fix coming soon