diff --git a/content/async_dispatcher.ts b/content/async_dispatcher.ts index 9918ed5aa..26cbed2ba 100644 --- a/content/async_dispatcher.ts +++ b/content/async_dispatcher.ts @@ -396,7 +396,7 @@ export const click_async = (async (element: SafeElementForMouse || (OnFirefox && Build.MinFFVer < FirefoxBrowserVer.MinPopupBlockerPassOrdinaryClicksDuringExtMessages && /*#__INLINE__*/ prepareToBlockClick_old_ff(result === ActionType.DispatchAndMayOpenTab , action < kClickAction.plainMayOpenManually + 1 && parentAnchor!), - (await await mouse_(element, CLK, center, modifiers, 0, 0, isTouch)) && result + (await await mouse_(element, CLK, center, modifiers, 0, button, isTouch)) && result || result & ActionType.dblClick)) && getVisibleClientRect_(element)) { // require element is still visible diff --git a/pages/options.html b/pages/options.html index fde404a89..a247f098d 100644 --- a/pages/options.html +++ b/pages/options.html @@ -36,7 +36,7 @@
-diff --git a/pages/options_base.ts b/pages/options_base.ts index 8aca9e878..c5863cb36 100644 --- a/pages/options_base.ts +++ b/pages/options_base.ts @@ -361,7 +361,7 @@ export class ExclusionRulesOption_ extends Option_<"exclusionRules"> { this.list_ = []; delayBinding_(this.$list_, "input", ExclusionRulesOption_.MarkChanged_) delayBinding_(this.$list_, "input", this.onUpdated_) - delayBinding_(this.$list_, "click", e => this.onRemoveRow_(e)) + delayBinding_(this.$list_, "click", e => { this.onRemoveRow_(e) }) this._rendered = false delayBinding_("#exclusionAddButton", "click", () => this.addRule_(""), "on") } @@ -389,7 +389,6 @@ addRule_ (pattern: string, autoFocus?: false | undefined): void { override populateElement_ (rules: ExclusionsNS.StoredRule[]): void { if (!this._rendered) { this._rendered = true - if (Option_.syncToFrontend_) { this.template_.draggable = true } for (const el of pageLangs_ !== "en" ? $$("[title]", this.template_) : []) { const t = pageTrans_(el.title) t && (el.title = t) @@ -449,7 +448,7 @@ static OnNewKeys_ (vnode: ExclusionVisibleVirtualNode): void { vnode.$keys_.placeholder = ""; } } -onRemoveRow_ (event: Event): void { +onRemoveRow_ (event: EventToPrevent): void { let element = event.target as EnsuredMountedElement element.localName === "path" && (element = element.parentElement) element.localName === "svg" && (element = element.parentElement) @@ -458,6 +457,7 @@ onRemoveRow_ (event: Event): void { if (element.classList.contains("exclusionRule")) { const vnode = (element.querySelector(".pattern") as ExclusionRealNode).vnode; element.remove(); + event.preventDefault() if (vnode.changed_ & kExclusionChange.mismatches && vnode.savedRule_.pattern) { Object.assign |