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

RESOLVED FIXED in seamonkey2.8

Status

SeaMonkey
Location Bar
--
enhancement
RESOLVED FIXED
6 years ago
5 years ago

People

(Reporter: Philip Chee, Assigned: Philip Chee)

Tracking

Trunk
seamonkey2.8

SeaMonkey Tracking Flags

(seamonkey2.8 fixed)

Details

Attachments

(2 attachments, 1 obsolete attachment)

(Assignee)

Description

6 years ago
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.
(Assignee)

Comment 1

6 years ago
Created attachment 580060 [details] [diff] [review]
Patch v1.0 checkForMiddleClick.

Is this the right approach?
Attachment #580060 - Flags: review?(neil)

Comment 2

6 years ago
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 3

6 years ago
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-
(Assignee)

Comment 4

6 years ago
Created attachment 580347 [details] [diff] [review]
Patch v1.1 Use existing  code block.

> 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 5

6 years ago
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+
(Assignee)

Comment 6

6 years ago
Created attachment 580630 [details] [diff] [review]
Patch v1.2 Patch as checked in.

>>         (('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+
(Assignee)

Updated

6 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
status-seamonkey2.8: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → seamonkey2.8
(Assignee)

Updated

5 years ago
Blocks: 752336
You need to log in before you can comment on or make changes to this bug.