Closed Bug 212629 Opened 21 years ago Closed 21 years ago

Middle-click (or control click) on selected text to invoke Web Search (in a tab)

Categories

(Firefox :: General, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: ralph, Assigned: bugzilla)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5a) Gecko/20030706 Mozilla Firebird/0.6 StumbleUpon/1.66
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5a) Gecko/20030706 Mozilla Firebird/0.6 StumbleUpon/1.66

Context: I love being able to middle-click on a link to open it in a new tab. I
also love Web Search.

This, I think, leads naturally to my suggested enhancement: middle-click (or
control click) on /selected text/ (rather than a link) invokes the Web Search
feature (as currently found in the context menu).

Reproducible: Always

Steps to Reproduce:
1. Select some text.
2. Middle-click (or control click) over the selection.

Actual Results:  
Autoscroll mode is toggled.

Expected Results:  
Web Search is invoked, with the results appearing in either a new tab or new
window depending on preference settings, and that tab/window being loaded in the
background, or immediately gaining focus, again depending on preference settings.

It's very possible, probable even, that this suggested feature could (and if so,
should) be implemented via an extension (if it's going to get implemented at all
of course). I'm assuming one is still supposed to file bugs here, regardless.]

Possible refinement #1: Put the results in a new tab (rather than a new Window,
as Web Search does at the moment). This should probably depend on the existing
related pref settings to do with opening stuff in tabs/windows. See also bug
#133117.

Possible refinement #2: Load the results in the background, keeping focus in the
clicked window rather than immediately switching focus to the new tab/window.
This should possibly depend on the existing related pref settings to do with
loading stuff in tabs in the background.

Wrinkle #1: What if selected text includes a link and one middle-clicks on the
selected link? I think Web Search should take precedence for a bunch of reasons.
I think this is obvious. I can explain if need be.

Wrinkle #2: At the moment, middle-click also toggles autoscroll mode. I'm
assuming that someone will fix this so that middle-clicking over a link has no
effect on autoscroll mode. If this feature here is implemented, the same should
apply if middle-clicking over selected text.

I think this feature might also nicely cover bug #10080; one could select the
link, middle/control click, and then google would dutifully ask "Did you mean:
http://foo.bar.baz/...".
Minor correction:

Actual Results:  
Middle-click -> Autoscroll mode is toggled.
Control-click -> selection is deselected.
Wrinkle #3:

> I think the middle clicking on selected text to open a new tab
> will interfere with a feature already inherent in *nix systems.
> Middle clicking on selected text = copy/paste, at least on the only
> Unix system I've used... I bet it functions similarly in Linux too. 

Remember that there's already middle clicking on a link to open a new tab.

I believe the existing mozilla use of middle-click, and my proposed addition,
don't interfere in the common case, which is use of mozilla as a browser to view
readonly pages.

In the more akward cases, using mozile or composer, perhaps middle-click as
paste is worth having. Otoh, I suspect that if a user middle-clicks some
/selected/ editable text, the click is probably not intended as a paste
operation, and the same is probably true, albeit to a lesser extent, of
middle-clicking somewhere within an unselected /link/.
Summary: Middle-click (or control click) on selected text invokes Web Search (in a tab) → Middle-click (or control click) on selected text to invoke Web Search (in a tab)
ralph, fyi, extension authors are independent of the Firebird project so bugs
should not be filed here requesting extensions.

a better place to bring this up is the MozillaZine forums
(http://forums.mozillazine.org/) or possibly the AiO Mouse Gestures extension
authors would be interested.

I personally wouldn't want this, certainly not by default, as it creates more
complexity in what middle-click does.  And once you get into multiple prefs
defining behaviour, it becomes something far more suited to an extension than a
core feature.

Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.