Set preventDefault flag when URL is passed to CLH

Fixes #3132
This commit is contained in:
Abe Jellinek 2023-05-25 17:28:16 +03:00
parent 117dbe1fe0
commit 76b7fd0dc1

View file

@ -535,11 +535,13 @@ ZoteroCommandLineHandler.prototype = {
if(isStandalone()) {
var fileToOpen;
// Special handler for "zotero" URIs at the command line to prevent them from opening a new window
// Handle zotero:// and file URIs and prevent them from opening a new window
var param = cmdLine.handleFlagWithParam("url", false);
if (param) {
cmdLine.preventDefault = true;
var uri = cmdLine.resolveURI(param);
if(uri.schemeIs("zotero")) {
if (uri.schemeIs("zotero")) {
addInitCallback(function (Zotero) {
Zotero.uiReadyPromise
.then(function () {