Merge pull request #4240 from SiriusXT/LauncherWidget

Fix right click bookmark bug
This commit is contained in:
zadam 2023-09-06 23:10:54 +02:00 committed by GitHub
commit 55374ac4d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -34,7 +34,7 @@ export default class NoteLauncher extends AbstractLauncher {
async launch(evt) {
// await because subclass overrides can be async
const targetNoteId = await this.getTargetNoteId();
if (!targetNoteId) {
if (!targetNoteId || evt.which === 3) {
return;
}

View File

@ -17,6 +17,9 @@ export default class OpenNoteButtonWidget extends OnClickButtonWidget {
}
async launch(evt) {
if (evt.which === 3) {
return;
}
const ctrlKey = utils.isCtrlKey(evt);
if ((evt.which === 1 && ctrlKey) || evt.which === 2) {