-
Notifications
You must be signed in to change notification settings - Fork 0
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 #5310 (Editor HTML menus are broken). #4888
Comments
Comment by RaymondLim
|
Comment by busykai
|
Comment by RaymondLim Yes, I think your changes are safe to prevent the bootstrap code that steals the focus from the editor. So merging now. |
Comment by peterflynn I wonder if this is the kind of case where we should feel free to directly patch the Bootstrap code? (Which is how Bootstrap was intended to be used, I think -- sort of as scaffolding rather than as a 'read-only' dependency). If all that's needed is commenting out one line of code in bootstrap-dropdown.js (line 58?), it'd definitely be simpler than the patch here... |
Comment by busykai It definitely might be a solution. I didn't want to go for it because I thought it would make brackets code more vulnerable to bootstrap upgrades. Over time there might be just too much things to remember about when moving from one bootstrap version to another (or any other library which may require adjustments). The suggested fix, on the contrary, just makes sure that bootstrap does not impact brackets behavior. If bootstrap was included as a submodule, then it would make a patched version more sustainable -- there would be an explicit merge step when upgrading. |
Comment by peterflynn
Well, as long as we make the changes after initially dropping in a clean copy of Bootstrap, In a sense, it might be more upgrade-fragile to have various Bootstrap-specific workarounds scattered around our codebase. The next time we upgrade, it won't be easy to go find all these and re-evaluate or remove them. (One thing that can help is to add a comment explicitly mentioning Bootstrap and citing the bug number, but unfortunately I didn't catch this PR soon enough to make that suggestion). |
Comment by busykai
|
Comment by RaymondLim
|
Comment by peterflynn
|
Issue by busykai
Monday Sep 23, 2013 at 22:47 GMT
Originally opened as adobe/brackets#5311
Override the implementation of the jquery focus() to prevent HTML menus
(class "dropdown-toggle") grabbing the focus.
Bootstrap's dropdown implementation exlicitly calls focus() which causes
currently active CM instance to lose focus. As the result, when the
command is executed, it cannot get ahold of the current editor instance.
busykai included the following code: https://github.com/adobe/brackets/pull/5311/commits
The text was updated successfully, but these errors were encountered: