-
Notifications
You must be signed in to change notification settings - Fork 491
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
API Editor: it is often tricky to click on a dropdown item #111
Comments
I just retested this with the latest release and it is NOT fixed. This is a tricky one. :( The next thing to try, I think, is leveraging ngx-bootstrap's dropdown directive. |
I think I finally knocked this one out. It turns out to be a combination of things. The core problem with the drop-down is with the options input. If the options change, then change detection will cause the DOM elements (the So the solution to that part of the problem is to do a deep-compare of the drop-down options whenever they change. If no real change is made then we keep the old value. This centrally fixes all users of the The second part of the problem (not yet solved) is that the Ace editor fires an absurd number of events, all/many of which trigger angular change detection. This includes mouse-over events, cursor blinking events, typing, etc. But it also includes at least one "font detection worker" that polls every 500ms. I presume Ace is using Last, the Ace editor component doesn't clean up after itself, leaving the Ace editor (and its font detection worker) around even after the component is destroyed. So every time an ace editor is added to the page, another font polling worker is created, and the drop-down problem gets even worse. Of course, everything will slow down over time as more and more 500ms workers are created and not destroyed. At this time, the drop-down flickering problem is solved, but the Ace editor problem is not. A new issue is here for that: |
Sometimes when trying to click on a dropdown item, particularly one of the dropdowns from within a type editor, it's difficult to get the click to register. The item will turn blue to indicate that it was clicked, but then turn back to normal without making the selection. This is hard to reproduce consistently but is not uncommon.
The text was updated successfully, but these errors were encountered: