mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 09:20:06 +02:00
Convert the existing overlays to use <dialog>
elements (issue 14698)
This replaces our *custom* overlays with standard `<dialog>` DOM elements, see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog, thus simplifying the related CSS, HTML, and JavaScript code. With these changes, some of the functionality of the `OverlayManager` class is now handled natively (e.g. `Esc` to close the dialog). However, since we still need to be able to prevent dialogs from overlaying one another, it still makes sense to keep this functionality (as far as I'm concerned).
This commit is contained in:
parent
0dd6bc9a85
commit
f0aa08b464
9 changed files with 221 additions and 272 deletions
|
@ -161,16 +161,16 @@ function getViewerConfiguration() {
|
|||
findNextButton: document.getElementById("findNext"),
|
||||
},
|
||||
passwordOverlay: {
|
||||
overlayName: "passwordOverlay",
|
||||
container: document.getElementById("passwordOverlay"),
|
||||
dialogName: "passwordDialog",
|
||||
dialog: document.getElementById("passwordDialog"),
|
||||
label: document.getElementById("passwordText"),
|
||||
input: document.getElementById("password"),
|
||||
submitButton: document.getElementById("passwordSubmit"),
|
||||
cancelButton: document.getElementById("passwordCancel"),
|
||||
},
|
||||
documentProperties: {
|
||||
overlayName: "documentPropertiesOverlay",
|
||||
container: document.getElementById("documentPropertiesOverlay"),
|
||||
dialogName: "documentPropertiesDialog",
|
||||
dialog: document.getElementById("documentPropertiesDialog"),
|
||||
closeButton: document.getElementById("documentPropertiesClose"),
|
||||
fields: {
|
||||
fileName: document.getElementById("fileNameField"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue