Closed Bug 708640 Opened 14 years ago Closed 14 years ago

Should be able to open a new tab by middle-clicking the "Go" button.

Categories

(SeaMonkey :: Location Bar, enhancement)

enhancement
Not set
normal

Tracking

(seamonkey2.8 fixed)

RESOLVED FIXED
seamonkey2.8
Tracking Status
seamonkey2.8 --- fixed

People

(Reporter: philip.chee, Assigned: philip.chee)

References

Details

Attachments

(2 files, 1 obsolete file)

Relevant Firefox bugs: [Bug 279687] Should be able to open new tab by middle-clicking "Go" button. [Bug 339710] Can't use "Go" button" with using keyword or space. [Bug 405541] Location Bar don't revert back to the correct url of the tab when you middle click go after entering text, to open in a new tab.
Attached patch Patch v1.0 checkForMiddleClick. (obsolete) — Splinter Review
Is this the right approach?
Attachment #580060 - Flags: review?(neil)
Does Ctrl+Clicking the "Go" button already work? I think that uses an earlier code block, might be worth seeing whether we can hook into that instead.
Comment on attachment 580060 [details] [diff] [review] Patch v1.0 checkForMiddleClick. >+ var where = whereToOpenLink(aTriggeringEvent, false, false); Indeed, this is wrong because it uses the wrong pref. Instead you need to look for a potential button 1 in the original conditional block. >+ onclick="checkForMiddleClick(this, event);" This part of the patch is fine of course.
Attachment #580060 - Flags: review?(neil) → review-
> Does Ctrl+Clicking the "Go" button already work? I think that uses an earlier > code block, might be worth seeing whether we can hook into that instead. Fixed. > Comment on attachment 580060 [details] [diff] [review] > Patch v1.0 checkForMiddleClick. > >>+ var where = whereToOpenLink(aTriggeringEvent, false, false); > Indeed, this is wrong because it uses the wrong pref. Instead you need to look > for a potential button 1 in the original conditional block. Fixed. >>+ onclick="checkForMiddleClick(this, event);" > This part of the patch is fine of course. Phew.
Attachment #580060 - Attachment is obsolete: true
Attachment #580347 - Flags: review?(neil)
Comment on attachment 580347 [details] [diff] [review] Patch v1.1 Use existing code block. > (('ctrlKey' in aTriggeringEvent && aTriggeringEvent.ctrlKey) || >- ('metaKey' in aTriggeringEvent && aTriggeringEvent.metaKey))) { >+ ('metaKey' in aTriggeringEvent && aTriggeringEvent.metaKey) || >+ (aTriggeringEvent instanceof MouseEvent && aTriggeringEvent.button == 1))) { Would you mind using the same style as the other conditions?
Attachment #580347 - Flags: review?(neil) → review+
>> (('ctrlKey' in aTriggeringEvent && aTriggeringEvent.ctrlKey) || >>- ('metaKey' in aTriggeringEvent && aTriggeringEvent.metaKey))) { >>+ ('metaKey' in aTriggeringEvent && aTriggeringEvent.metaKey) || >>+ (aTriggeringEvent instanceof MouseEvent && aTriggeringEvent.button == 1))) { > Would you mind using the same style as the other conditions? Done. Pushed to comm-central: http://hg.mozilla.org/comm-central/rev/3d2c908c2938
Attachment #580630 - Flags: review+
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → seamonkey2.8
Blocks: 752336
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: