Topic on Extension talk:Popups

Disable popups for a[href^="#"]

4
Summary by Thiemo Kreuz (WMDE)

Resolved, see phab:T216683.

Joeytje50 (talkcontribs)

In my opinion, there's no (good) reason to have a page preview for any link that starts with a #, because those links are always to the page itself. You don't need a preview for pages you're already on them, so there's no need to show the preview.

This is relevant because in some situations, such as in Extension:Kartographer, the zoom-in and zoom-out buttons are links with a title="zoom (in|out)" attribute, and because this extension triggers on (it seems) any a[title], those links get a popup, which is completely pointless.

Now I could ask Kartographer to change their code, but I think their implementation is fine, since they're using the title attribute exactly as it's intended. So, to fix this issue, this extension should be changed a bit that a[href^="#"] does not trigger a popup.

Quiddity (talkcontribs)

Hmm. That's a good point regarding links that are buttons. See also phab:T198652 regarding "^" links in the <references /> section.

However I still hope that we'll eventually get functionality for previewing ==section== links (See phab:T156041 and duplicates), so I'd be worried about any solution which blocked that.

Joeytje50 (talkcontribs)

In that case, at least preventing a[href="#"] would fix it. The only way that ever appears is in scripts that insert it (since [[#]] doesn't link to "#", but instead links to the actual page itself as an actual link), and those scripts never intend for it to be a link to the top of the page.

Thiemo Kreuz (WMDE) (talkcontribs)

I believe the issue described here is resolved with phab:T212419 as well as the changes later done to fix the regression described in phab:T216683. Please feel free to reopen this topic or create a new Phabricator ticket in case we missed something.