Middle click on search suggestion from about:home/newtab pages opens the searches in foreground tabs

VERIFIED FIXED in Firefox 40

Status

()

defect
VERIFIED FIXED
4 years ago
4 years ago

People

(Reporter: petruta.rasa, Assigned: k-mimura, Mentored)

Tracking

38 Branch
Firefox 40
Points:
---

Firefox Tracking Flags

(firefox40 verified)

Details

(Whiteboard: [good first bug][lang=js])

Attachments

(1 attachment, 2 obsolete attachments)

Reproducible on:
latest Developer Edition 38.0a2 
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0
latest Nightly 39.0a1 - 20150225030226
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0

Steps to reproduce:
1. Enter a string on about:home or about:newtab page 
2. Move the mouse on suggestions drop-down list
3. Click on them using the mouse middle click button

Actual results:
Middle click opens a foreground tab with the search results.

Expected results:
Searches should open in background tabs.

Notes: The issue reproduces also under Mac OSX 10.10 and Ubuntu 12.10 32-bit.

Updated

4 years ago
Mentor: adw
Whiteboard: [good first bug][lang=js]
Hi, I would like to work on this bug. I am new to contributing to open source. So if this is a bug that I could get some guidance on then it would be appreciated!
Hi Wickie,

Thanks for volunteering!  This should be a simple bug to fix.  But first you need to set up a Firefox build environment.  If you haven't done that yet, please see these links:

https://developer.mozilla.org/en-US/docs/Introduction
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide

There are two parts to this bug, about:home and about:newtab.

For about:home, you need to change "tab" on this line to "tabshifted": http://mxr.mozilla.org/mozilla-central/source/browser/modules/AboutHome.jsm?rev=2e9ff15fa9c7#201

For about:newtab, you need to remove these three lines: http://mxr.mozilla.org/mozilla-central/source/browser/modules/ContentSearch.jsm?rev=2e9ff15fa9c7#229  As you can see, if `data` says to use a new tab, then we set the selected tab to the new tab.  We should just not do that anymore.

And that should be it!  Once you've made your changes and you've tested them, you can attach your patch to this bug as described here: https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/How_to_Submit_a_Patch#Submitting_the_patch

If you need help generating a patch in the first place, check here: https://developer.mozilla.org/en-US/docs/Mercurial_FAQ#How_can_I_generate_a_patch_for_somebody_else_to_check-in_for_me.3F

Good luck, let me know here in the bug when you have questions.
Wickie Lee: do you still want to take care of this bug ?

Comment 4

4 years ago
:adw Hey, I would love to work on this as my first bug. I already have my enviroment setup and everything. Is it okay if I take this one?
Sure, it doesn't look like Wickie is working on it.

Comment 6

4 years ago
:adw Where could I find the files for about:home, and about:newtab?
Please see comment 2.
(Assignee)

Comment 8

4 years ago
Hello, I am new here and I worked on this and could I upload the patch file here if you don't mind?
(Assignee)

Comment 9

4 years ago
Posted patch ForAboutHome(1137234).diff (obsolete) — Splinter Review
there are two patches and this is the first one.
(Assignee)

Comment 10

4 years ago
this is the second one.
Comment on attachment 8585771 [details] [diff] [review]
ForAboutHome(1137234).diff

Hey Keita - thanks for digging into this!

I'll flag Drew for feedback on these. It's typically a good idea to do that so that your patches don't get lost! https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/How_to_Submit_a_Patch has a bit more background on the overall process.

Another thing to consider is that these two patches would ideally be combined. https://developer.mozilla.org/en-US/docs/Mercurial_FAQ#How_can_I_generate_a_patch_for_somebody_else_to_check-in_for_me.3F has a bit of background about how to generate patches using Mercurial, which would take care of that for you.
Attachment #8585771 - Flags: feedback?(adw)
(Assignee)

Comment 12

4 years ago
(In reply to :Gavin Sharp [email: gavin@gavinsharp.com] from comment #11)
> Comment on attachment 8585771 [details] [diff] [review]
> ForAboutHome(1137234).diff
> 
> Hey Keita - thanks for digging into this!
> 
> I'll flag Drew for feedback on these. It's typically a good idea to do that
> so that your patches don't get lost!
> https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/
> How_to_Submit_a_Patch has a bit more background on the overall process.
> 
> Another thing to consider is that these two patches would ideally be
> combined.
> https://developer.mozilla.org/en-US/docs/
> Mercurial_FAQ#How_can_I_generate_a_patch_for_somebody_else_to_check-
> in_for_me.3F has a bit of background about how to generate patches using
> Mercurial, which would take care of that for you.

Thanks for replying! sorry I just started here.. I will try to use!
Comment on attachment 8585771 [details] [diff] [review]
ForAboutHome(1137234).diff

Review of attachment 8585771 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks, Keita, these both look good, so I'll land them now.
Attachment #8585771 - Flags: feedback?(adw) → review+

Updated

4 years ago
Attachment #8585772 - Flags: review+

Updated

4 years ago
Assignee: nobody → k-mimura
Status: NEW → ASSIGNED
Posted patch landed patchSplinter Review
Here's the single combined patch that I landed.

https://hg.mozilla.org/integration/fx-team/rev/af2151f856fb

Keita, I pushed your patch to our fx-team tree, which is where front-end Firefox development happens.  In the next day or so, someone will come along and merge your patch with the main Mozilla development tree, mozilla-central, and mark this bug as fixed.  Firefox Nightly is built from mozilla-central, so once that happens, you should be able to see your fix in the following Nightly.  Thanks!
Attachment #8585771 - Attachment is obsolete: true
Attachment #8585772 - Attachment is obsolete: true
Attachment #8589229 - Flags: review+
https://hg.mozilla.org/mozilla-central/rev/af2151f856fb
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 40
QA Whiteboard: [good first verify]

Comment 16

4 years ago
Verified fix (Firefox Nightly 40.0a1(2015-04-20) windows. 

I checked from about:home and about:newtab page

1. Enter a string on about:home or about:newtab page 
2. Move the mouse on suggestions drop-down list
3. Click on them using the mouse middle click button

Searches opened as background tab as expected.
Thanks for verifying, Martin.

I'm updating the status flags.
Status: RESOLVED → VERIFIED

Updated

4 years ago
See Also: → 1166465
You need to log in before you can comment on or make changes to this bug.