Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Commit 86207da

Browse files
committed
Merge pull request #5311 from busykai/fix-5310
Fix #5310 (Editor HTML menus are broken).
2 parents d296dc0 + 8e5ad95 commit 86207da

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/brackets.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,16 @@ define(function (require, exports, module) {
283283
// Enable/Disable HTML Menus
284284
if (brackets.nativeMenus) {
285285
$("body").addClass("has-appshell-menus");
286+
} else {
287+
// Prevent the menu item to grab the focus -- override focus implementation
288+
(function () {
289+
var defaultFocus = $.fn.focus;
290+
$.fn.focus = function () {
291+
if (!this.hasClass("dropdown-toggle")) {
292+
defaultFocus.apply(this, arguments);
293+
}
294+
};
295+
}());
286296
}
287297

288298
// Localize MainViewHTML and inject into <BODY> tag

0 commit comments

Comments
 (0)