|  | @@ -146,7 +146,8 @@
 | 
											
												
													
														|  |          action-fn! (fn [action clear?]
 |  |          action-fn! (fn [action clear?]
 | 
											
												
													
														|  |                       (when-let [action (and action (name action))]
 |  |                       (when-let [action (and action (name action))]
 | 
											
												
													
														|  |                         (let [highlight (if (fn? highlight) (highlight) highlight)
 |  |                         (let [highlight (if (fn? highlight) (highlight) highlight)
 | 
											
												
													
														|  | -                             content (:content highlight)]
 |  | 
 | 
											
												
													
														|  | 
 |  | +                             content (:content highlight)
 | 
											
												
													
														|  | 
 |  | +                             ^js owner-win (pdf-windows/resolve-own-window viewer)]
 | 
											
												
													
														|  |                           (case action
 |  |                           (case action
 | 
											
												
													
														|  |                             "ref"
 |  |                             "ref"
 | 
											
												
													
														|  |                             (pdf-assets/copy-hl-ref! highlight viewer)
 |  |                             (pdf-assets/copy-hl-ref! highlight viewer)
 | 
											
										
											
												
													
														|  | @@ -155,7 +156,7 @@
 | 
											
												
													
														|  |                             (do
 |  |                             (do
 | 
											
												
													
														|  |                               (util/copy-to-clipboard!
 |  |                               (util/copy-to-clipboard!
 | 
											
												
													
														|  |                                (or (:text content) (pdf-utils/fix-selection-text-breakline (.toString selection)))
 |  |                                (or (:text content) (pdf-utils/fix-selection-text-breakline (.toString selection)))
 | 
											
												
													
														|  | -                              :owner-window (pdf-windows/resolve-own-window viewer))
 |  | 
 | 
											
												
													
														|  | 
 |  | +                              :owner-window owner-win)
 | 
											
												
													
														|  |                               (pdf-utils/clear-all-selection))
 |  |                               (pdf-utils/clear-all-selection))
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |                             "link"
 |  |                             "link"
 | 
											
										
											
												
													
														|  | @@ -178,7 +179,7 @@
 | 
											
												
													
														|  |                                                        {:id         (pdf-utils/gen-uuid)
 |  |                                                        {:id         (pdf-utils/gen-uuid)
 | 
											
												
													
														|  |                                                         :properties properties})]
 |  |                                                         :properties properties})]
 | 
											
												
													
														|  |                                   (p/let [highlight' (add-hl! highlight)]
 |  |                                   (p/let [highlight' (add-hl! highlight)]
 | 
											
												
													
														|  | -                                   (pdf-utils/clear-all-selection)
 |  | 
 | 
											
												
													
														|  | 
 |  | +                                   (pdf-utils/clear-all-selection owner-win)
 | 
											
												
													
														|  |                                     (pdf-assets/copy-hl-ref! highlight' viewer)))
 |  |                                     (pdf-assets/copy-hl-ref! highlight' viewer)))
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  ;; update highlight
 |  |  ;; update highlight
 |