Skip to content
Snippets Groups Projects
Commit fb0e2b0c authored by James Yu's avatar James Yu
Browse files

Fix #4459 Additional menu buttons in PDF viewer drop down menu no longer hide menu on click

parent bd01da6e
No related branches found
No related tags found
No related merge requests found
......@@ -77,7 +77,10 @@ export async function patchViewerUI() {
for (const node of template.content.childNodes) {
anchor.parentNode?.insertBefore(node, anchor)
}
const trimButton = document.getElementById('TrimButton')! as HTMLButtonElement
trimButton.addEventListener('click', (e) => {
e.stopPropagation()
})
registerSynctexCheckBox()
registerAutoReloadCheckBox()
......@@ -104,8 +107,9 @@ export async function patchViewerUI() {
function registerSynctexCheckBox() {
const synctexOn = document.getElementById('synctexOn')! as HTMLInputElement
const synctexOnButton = document.getElementById('synctexOnButton')! as HTMLInputElement
synctexOnButton.addEventListener('click', () => {
synctexOnButton.addEventListener('click', (e) => {
synctexOn.checked = toggleSyncTeX()
e.stopPropagation()
// PDFViewerApplication.secondaryToolbar.close()
})
}
......@@ -113,8 +117,9 @@ function registerSynctexCheckBox() {
function registerAutoReloadCheckBox() {
const autoRefreshOn = document.getElementById('autoRefreshOn')! as HTMLInputElement
const autoRefreshOnButton = document.getElementById('autoRefreshOnButton')! as HTMLButtonElement
autoRefreshOnButton.addEventListener('click', () => {
autoRefreshOnButton.addEventListener('click', (e) => {
autoRefreshOn.checked = toggleAutoRefresh()
e.stopPropagation()
// PDFViewerApplication.secondaryToolbar.close()
})
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment