Conversation
…ave highlight on mouse hover.
|
Looks good. Merging... |
Re-create dropdown event handler so that the new rendered list will have highlight on mouse hover.
|
Drive-by: I don't think it's safe to just create a new DropdownEventHandler and discard the old one without doing any cleanup. It looks like the old one does things like register global keydown hooks, mouse events, etc. which should be unregistered before creating a new one. (Even though the old items are going away, the mouse events appear to be attached to the parent through delegation, and the parent isn't getting deleted/recreated.) Since the parent isn't deleted on re-render, do we know why the highlight behavior was lost? It seems like the mouse handlers should still work. |
|
(BTW, this is probably another good reason to unify the DropdownEventHandler and at least the list-management portions of DropdownButton. The current factoring seems weird.) |
This fixes #7969.
@bchintx Can you review this also? Thanks.