From 0cf2a52745c4691e1edf46207c7a06c02938e236 Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Sat, 12 Sep 2015 08:58:20 -0400 Subject: [PATCH] Add styling to make mouse-based menu display look as the same as before (no focus highlighting, though focus is still set) --- unpacked/extensions/MathMenu.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/unpacked/extensions/MathMenu.js b/unpacked/extensions/MathMenu.js index 7a7a949c6..719638cf4 100644 --- a/unpacked/extensions/MathMenu.js +++ b/unpacked/extensions/MathMenu.js @@ -152,12 +152,21 @@ ".MathJax_MenuDisabled": { color:"GrayText" }, - ".MathJax_MenuActive": { "background-color": (isPC ? "Highlight" : "#606872"), color: (isPC ? "HighlightText" : "white") }, + ".MathJax_MenuDisabled:focus, .MathJax_MenuLabel:focus": { + "background-color": "#E8E8E8" + }, + ".MathJax_ContextMenu:focus": { + outline:"none" + }, + ".MathJax_ContextMenu .MathJax_MenuItem:focus": { + outline:"none" + }, + "#MathJax_AboutClose": { top:".2em", right:".2em" }, @@ -282,6 +291,8 @@ menuItem: this, className: "MathJax_Menu", onkeydown: MENU.Keydown, role: "navigation" }); + if (event.type === "contextmenu" || event.type === "mouseover") + menu.className += " MathJax_ContextMenu"; if (!forceLTR) {MathJax.Localization.setCSS(menu)} for (var i = 0, m = this.items.length; i < m; i++) {this.items[i].Create(menu)}