Skip to content

Commit

Permalink
Open in Tabs: Fix interaction with Tumblr Patio UI (#1372)
Browse files Browse the repository at this point in the history
Co-authored-by: April Sylph <28949509+AprilSylph@users.noreply.github.com>
  • Loading branch information
marcustyphoon and AprilSylph committed Mar 11, 2024
1 parent 1988117 commit 7951488
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/scripts/open_in_tabs.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import { keyToCss } from '../util/css_map.js';

const linkSelector = 'a[role="link"][target="_blank"]';

const onDocumentClick = event => {
if (event.target.matches(`${linkSelector}, ${linkSelector} *`)) {
if (
event.target.matches(`${linkSelector}, ${linkSelector} *`) &&
!event.target.closest(keyToCss('columnOptions'))
) {
event.stopPropagation();
}
};
Expand Down

0 comments on commit 7951488

Please sign in to comment.