1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-04-27 02:51:00 +00:00

[pdf file view] fixup: make the top-right toolbar restore usable (#7634)

This commit is contained in:
llj 2025-03-17 22:16:33 +08:00 committed by GitHub
parent 5c9edac317
commit 63c3b36b80
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 1 deletions

View File

@ -329,7 +329,7 @@ class PDFViewer extends React.Component {
</div>
{/* <!-- mainContainer -->*/}
<div id="dialogContainer" className="modal d-block">
<div id="dialogContainer" className="modal">
<dialog id="passwordDialog" className="modal-dialog p-0 rounded border-0 shadow-none">
<div className="modal-content">
<div className="modal-header">

View File

@ -3959,6 +3959,10 @@ class OverlayManager {
throw new Error("Another overlay is currently active.");
}
}
var $dialogContainer = document.getElementById("dialogContainer");
if ($dialogContainer.className.indexOf('d-block') == -1) {
$dialogContainer.className += ' d-block';
}
this.#active = dialog;
dialog.showModal();
}
@ -3972,6 +3976,10 @@ class OverlayManager {
}
dialog.close();
this.#active = null;
var $dialogContainer = document.getElementById("dialogContainer");
if ($dialogContainer.className.indexOf('d-block') != -1) {
$dialogContainer.className = 'modal';
}
}
}
exports.OverlayManager = OverlayManager;