You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix bug #1384 (Exception when selecting Quick Open result by clicking).
Any Smart Autocomplete code that runs after $.remove() will fail because remove() strips off metadata that it expects to find on the text input element. The fix is (a) to forcibly close Smart Autocomplete every time we're closing the search bar, and (b) only fully clean up the search bar after a timeout, to let Smart Autocomplete's event handlers finish running. ('A' is needed due to the additional case Randy spotted, where Smart Autocomplete never tries to close if there's no Editor open for it to lose focus to).
Also: rename handleDocumentClick() since it actually handles mouseDown, and clarify its comment.
Comment by peterflynn Thursday Aug 30, 2012 at 00:39 GMT
One other note: as an alternative, I could have made Quick Open's UI a singleton that is merely hidden & reshown later, instead of actually removing the old DOM nodes and creating new ones each time. But that seemed more disruptive.
But in the longer term, I think we should either do that or ditch Smart Autocomplete altogether. Smart Autocomplete isn't actually designed to ever be detached from the DOM, so there may be other bugs lurking with similar causes as this one.
Issue by peterflynn
Thursday Aug 30, 2012 at 00:36 GMT
Originally opened as adobe/brackets#1513
Fix bug #1384 (Exception when selecting Quick Open result by clicking).
Any Smart Autocomplete code that runs after $.remove() will fail because remove() strips off metadata that it expects to find on the text input element. The fix is (a) to forcibly close Smart Autocomplete every time we're closing the search bar, and (b) only fully clean up the search bar after a timeout, to let Smart Autocomplete's event handlers finish running. ('A' is needed due to the additional case Randy spotted, where Smart Autocomplete never tries to close if there's no Editor open for it to lose focus to).
Also: rename handleDocumentClick() since it actually handles mouseDown, and clarify its comment.
peterflynn included the following code: https://github.com/adobe/brackets/pull/1513/commits
The text was updated successfully, but these errors were encountered: