Last modified: 2014-09-24 00:53:24 UTC
Created attachment 11389 [details] Patch for Vector.php Skin Vector contains <a href="#"></a> for variants and for actions. This generates a annoying link to # when clicking with a middle click or when JavaScript is disabled. Please remove href="#".
Removing href="#" does not solve the problem. That will instead create a link to the current url (and the behaviour is unstable in older browsers). This is likely a case of a forgotten call to e.preventDefault().
Also, these anchor tags on the headings shouldn't exist afaik. Are they still there? I thought we're styling the <h5> directory now, or at least adding them dynamically.
With e.preventDefault() it is not possible to prevent a middle click to open a new tab at least in Firefox 16 and Opera 12. And when JavaScript is disabled the link is always active. This is annoying. Why is there a <a href="#"></a>? Would a simple <div></div> be enough?
(In reply to comment #3) > With e.preventDefault() it is not possible to prevent a middle click to open a > new tab at least in Firefox 16 and Opera 12. And when JavaScript is disabled > the link is always active. This is annoying. > > Why is there a <a href="#"></a>? Would a simple <div></div> be enough? Yes, as I said already: (comment #2) > [..] these anchor tags on the headings shouldn't exist. They are only there for style (blue links, and pointy cursor). Which is already being handled on the javascript side. Without javascript, the links don't belong there.
Created attachment 11391 [details] Patch for Bug 42241 Replace <a href="#"></a> by <div></div>
Fomafix: You are welcome to use Developer access https://www.mediawiki.org/wiki/Developer_access to submit this as a Git branch directly into Gerrit: https://www.mediawiki.org/wiki/Git/Tutorial Putting your branch in Git makes it easier for us to review it quickly.
Created attachment 11438 [details] Patch for Bug 42241 Rebased patch with <h3> instead of <h5>. Simplified because display: block is default for <div>. With <div> there is no workaround for Internet Explorer 6 necessary. Tested with Internet Explorer 6.
Fomafix, can you submit your change in Git?
Unfortunately, this patch does not apply cleanly to master. Fomafix, you can also submit patches using the web-based uploader at https://tools.wmflabs.org/gerrit-patch-uploader . Please use 'Bug: 42241' in your commit message to link it to this bug.
Change 136711 had a related patch set uploaded by Gerrit Patch Uploader: Vector: Use <div> instead of <a> for action menu https://gerrit.wikimedia.org/r/136711
Change 139795 had a related patch set uploaded by Gerrit Patch Uploader: Use <a> instead of <a href="#"> for JavaScript click events https://gerrit.wikimedia.org/r/139795
Change 154453 had a related patch set uploaded by Gerrit Patch Uploader: Use <div> instead of <a> for action menu https://gerrit.wikimedia.org/r/154453
Change 136711 abandoned by Bartosz Dziewoński: Vector: Use <div> instead of <a> for action menu Reason: Thank you. https://gerrit.wikimedia.org/r/136711