Repository navigation
Commit f508bdd
authored
FEATURE: Respect
* FEATURE: Respect `external_links_in_new_tab` in category banner descriptions
Previously, external links inside a category banner description ignored the user's "Open most external links in a new tab" preference because the banner renders outside the topic root and so escaped the post-level click tracker.
This adds a guarded click handler on the description that reuses `shouldOpenInNewTab` and `wantsNewWindow`, opening external
links in a new tab when the option is enabled while leaving `mailto:`, modifier-clicks, and pre-existing `target="_blank"` links
to the browser.
* DEV: pr feedback
* DEV: no need to test helpersexternal_links_in_new_tab in category banner descriptions (#114)1 parent 751f0de commit f508bdd
1 file changed
Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
48 | | - | |
| 49 | + | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| |||
211 | 212 | | |
212 | 213 | | |
213 | 214 | | |
214 | | - | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
215 | 218 | | |
216 | 219 | | |
217 | 220 | | |
| |||
0 commit comments