mirror of
https://github.com/zen-browser/desktop.git
synced 2026-01-24 21:56:10 +00:00
fix: prevent new window when shift-clicking links in split view glance, b=closes https://github.com/zen-browser/desktop/issues/11409, p=#11424
Co-authored-by: Nihal <121309701+nihalxkumar@users.noreply.github.com>
This commit is contained in:
@@ -559,6 +559,7 @@ groupbox h2 {
|
||||
#helpButton,
|
||||
#support-firefox,
|
||||
#tabGroupSuggestions,
|
||||
#web-appearance-manage-themes-link,
|
||||
.mission-message {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
min-width: 0;
|
||||
border-radius: var(--border-radius-medium);
|
||||
box-shadow: var(--zen-sidebar-notification-shadow);
|
||||
font-size: var(--font-size-medium);
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.zen-sidebar-notification-header {
|
||||
|
||||
@@ -51,6 +51,9 @@ let JSWINDOWACTORS = {
|
||||
keydown: {
|
||||
capture: true,
|
||||
},
|
||||
click: {
|
||||
capture: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
allFrames: true,
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
import { Downloads } from 'resource://gre/modules/Downloads.sys.mjs';
|
||||
import {
|
||||
nsZenDOMOperatedFeature,
|
||||
nsZenMultiWindowFeature,
|
||||
@@ -24,6 +23,7 @@ class nsZenDownloadAnimation extends nsZenDOMOperatedFeature {
|
||||
|
||||
async #setupDownloadListeners() {
|
||||
try {
|
||||
const Downloads = window.Downloads;
|
||||
const list = await Downloads.getList(Downloads.ALL);
|
||||
list.addView({
|
||||
onDownloadAdded: this.#handleNewDownload.bind(this),
|
||||
|
||||
@@ -86,14 +86,21 @@ export class ZenGlanceChild extends JSWindowActorChild {
|
||||
this.contentWindow.addEventListener('mousemove', this.mousemoveCallback, { once: true });
|
||||
}
|
||||
|
||||
on_mouseup(event) {
|
||||
on_mouseup() {
|
||||
if (this.#glanceTarget) {
|
||||
// Don't clear the glance target here, we need it in the click handler
|
||||
// See issue https://github.com/zen-browser/desktop/issues/11409
|
||||
this.#openGlance(this.#glanceTarget);
|
||||
}
|
||||
this.contentWindow.removeEventListener('mousemove', this.mousemoveCallback);
|
||||
}
|
||||
|
||||
on_click(event) {
|
||||
if (this.#glanceTarget) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
this.#openGlance(this.#glanceTarget);
|
||||
this.#glanceTarget = null;
|
||||
}
|
||||
this.contentWindow.removeEventListener('mousemove', this.mousemoveCallback);
|
||||
}
|
||||
|
||||
mousemoveCallback() {
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
"brandShortName": "Zen",
|
||||
"brandFullName": "Zen Browser",
|
||||
"release": {
|
||||
"displayVersion": "1.17.9b",
|
||||
"displayVersion": "1.17.10b",
|
||||
"github": {
|
||||
"repo": "zen-browser/desktop"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user