-
Notifications
You must be signed in to change notification settings - Fork 227
Update key explorer to use dialog element for help dialog. (mathjax/MathJax#3405) #1334
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
base: develop
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #1334 +/- ##
========================================
Coverage 86.72% 86.72%
========================================
Files 337 337
Lines 84145 84145
Branches 4769 4769
========================================
Hits 72971 72971
- Misses 11151 11174 +23
+ Partials 23 0 -23 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder whether we really need the fallback as the only browsers that do not support dialog
elements are IE and Opera Mini.
Just for the record, the reason for the fallback is that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One comment. O/w lgtm.
(help.childNodes[1] as HTMLElement).innerHTML = helpMessage(title, select); | ||
document.body.append(helpBackground); | ||
help.focus(); | ||
if (isDialog) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a comment, that we can simplify this in two years.
This PR allows the KeyExplorer to use a
<dialog>
element when the browser supports that, and uses the current method when that isn't available. In the latter case, we still create adialog
element, but it acts like a custom element in that case, since it isn't implemented directly.This resolve the
z-index
issue reported in mathjax/MathJax#3405.