Closed Bug 1156615 Opened 5 years ago Closed 5 years ago

(Browser API) ctrl/cmd/middle-click doesn't work if <a> element has children

Categories

(Core :: DOM: Core & HTML, defect)

x86
macOS
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla40
Tracking Status
firefox40 --- fixed

People

(Reporter: paul, Assigned: paul)

References

Details

Attachments

(1 file)

<a>foo</a> works. <a><span>foo</span></a> doesn't.
We should implement something similar to `hrefAndLinkNodeForClickEvent` (browser/base/content/browser.js).
Attached patch v1Splinter Review
Assignee: nobody → paul
Status: NEW → ASSIGNED
Attachment #8595136 - Flags: review?(kchen)
Attachment #8595136 - Flags: review?(kchen) → review+
That doesn't seem right to me.  If I have an <input> inside <a> and I middle-click on Linux to paste into it, won't this patch try to open the anchor href in a new tab?
(In reply to Not doing reviews right now from comment #3)
> That doesn't seem right to me.  If I have an <input> inside <a> and I
> middle-click on Linux to paste into it, won't this patch try to open the
> anchor href in a new tab?

B2G on Linux doesn't appear to support middle click for pasting.

If that's alright, I'd like to land this patch and file a follow-up bug to support pasting with middle click on Linux. Or maybe you have an idea of a better way to support middle click to open a link in a new tab.
Flags: needinfo?(bzbarsky)
Followup sounds fine as long as something is tracking this.  It's worth looking at what Firefox does here...
Flags: needinfo?(bzbarsky)
Paste with middle click: bug 1158101.
https://hg.mozilla.org/mozilla-central/rev/c01be883059b
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
Blocks: graphene
You need to log in before you can comment on or make changes to this bug.