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

[CLOSED] Fix bug #1384 (Exception when selecting Quick Open result by clicking) #1480

Open
core-ai-bot opened this issue Aug 29, 2021 · 2 comments

Comments

@core-ai-bot
Copy link
Member

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

@core-ai-bot
Copy link
Member Author

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.

@core-ai-bot
Copy link
Member Author

Comment by redmunds
Thursday Aug 30, 2012 at 01:16 GMT


Looks good. Merging.

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

No branches or pull requests

1 participant