From 68d37ecc0b39e5ddfc9966713d190c1b7d82a6f8 Mon Sep 17 00:00:00 2001 From: gdh1995 Date: Fri, 14 Jun 2024 02:39:52 +0800 Subject: [PATCH] FindMode: not hook selection color if focused on a transparent textbox for https://github.com/gdh1995/vimium-c/issues/1144 --- content/mode_find.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/content/mode_find.ts b/content/mode_find.ts index 1b1ad8907..1f46e1d08 100644 --- a/content/mode_find.ts +++ b/content/mode_find.ts @@ -13,7 +13,7 @@ import { getSelection_, isSelected_, docSelectable_, isHTML_, createElement_, CLK, MDW, removeEl_s, appendNode_s, isNode_, setDisplaying_s, findAnchor_, isSafeEl_, textContent_s, modifySel, parentNode_unsafe_s, selOffset_, blur_unsafe, getAccessibleSelectedNode, INP, BU, PGH, contains_s, setOrRemoveAttr_s, singleSelectionElement_unsafe, getNodeChild_, - getDirectionOfNormalSelection + getDirectionOfNormalSelection, getComputedStyle_ } from "../lib/dom_utils" import { wdZoom_, prepareCrop_, view_, dimSize_, selRange_, getZoom_, isSelARange, getViewBox_, scrollWndBy_, cropRectS_, @@ -905,9 +905,15 @@ export const executeFind = (query: string | null, options: Readonly(newAnchor) > EditableType.MaxNotTextBox + && getComputedStyle_((newAnchor as TextElement)).color!.includes("(0, 0, 0") isSafeEl_(par) && view_(par, 1) + specialFixForTransparent && (styleSelColorOut!.disabled = !0) if (posChange && /** go back */ !!(posChange & kNode.DOCUMENT_POSITION_PRECEDING) !== back) { hudTip(kTip.wrapWhenFind, 1, VTr(back ? kTip.atStart : kTip.atEnd)) }