* fix(pdf): do not hide ctx menu when its blank area is clicked * fix: ensure ctx menu is shown when text is selected
@@ -174,6 +174,7 @@
{:ref *el
:style {:top top :left left :visibility (if (and @*highlight-mode? new?) "hidden" "visible")}
:on-click (fn [^js/MouseEvent e]
+ (.stopPropagation e)
(when-let [action (.. e -target -dataset -action)]
(action-fn! action true)))}
@@ -599,9 +600,10 @@
:properties {}})))]
;; show ctx menu
- (set-tip-state! {:highlight hl-fn
- :selection selection
- :point point}))))
+ (js/setTimeout (fn []
+ (set-tip-state! {:highlight hl-fn
+ :selection selection
+ :point point})))) 0))
[(:range sel-state)])