Closed Bug 119960 Opened 24 years ago Closed 15 years ago

Add ability to open tabs on pressing enter in URL bar

Categories

(SeaMonkey :: Tabbed Browser, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX
Future

People

(Reporter: mozillaBugzilla, Unassigned)

References

Details

Attachments

(1 file, 3 obsolete files)

With bug 105537 being resolved to make control+enter open a URL in a new tab from thr URL bar, I'd like to open this but to make it possible to use enter in the URL bar to open a new tab, as this _REALLY_ suits my browsing style.
I forgot to mention this, but obviously it would be controlled by a pref.
You're obviously an obscene minority, is it really that hard to hit control too? Custom keybindings are planed eventually. I don't see a specific pref for this happening.
A minority, yes, but a quick scan of the first half of bug 105537 resulted in 3 people preferring this behaviour, and having to press ctrl+enter, on every URL is gona be a bit of a PITA. I'm not advocating removing ctrl+enter for openign the URL in a new tab, as alot of peopel seem to want to use ctrl+enter to open in a new tab.
confirming rfe...up to hyatt and marlon to decide if they wanna mark this wontfix, though.
Severity: normal → enhancement
Status: UNCONFIRMED → NEW
Ever confirmed: true
Reassigning to new component owner.
Assignee: hyatt → jaggernaut
-> nobody, future, helpwanted Wait for configurable keybindings.
Assignee: jaggernaut → nobody
Keywords: helpwanted
Target Milestone: --- → Future
*** Bug 121608 has been marked as a duplicate of this bug. ***
Please give us a hidden pref. This bug combined with bug 50255 completely breaks browser.tabs.opentabfor.urlbar for windows users.
This is a first go at this patch. Due to the fact that Control+Enter seems to not be working on MacOSX either, I havn't been able to test this patch to any degree at all.
I may aswell take this bug.
Assignee: nobody → mpal1
Accept. Anyone know what I do with the patch now that it's here?
Status: NEW → ASSIGNED
Keywords: helpwantedpatch
I also vote for wontfix.
BZ: Could you provide some guidance here? Marcus: From discussions outside bugzilla, I am under the impression that your patch would be more well accepted if there was not a UI for the pref.
Blocks: 122086
With bug 122086, it sounds as it it may be better to leave the UI in the patch until Ctrl+enter works on all platforms (just a rehash of 122086)
The patch looks fine as far as that goes... Maybe the "ctrl" should act the same as shift does for loading tabs in background/foreground? There "shift" will toggle the sense of the pref to the reverse. So if middle-click opens new tabs in background, shift-middle-click does foreground (and vice versa). So I would suggest that we have one pref for whether enter opens a new window or new tab (default to window) and have "ctrl" reverse that pref. This means that ctrl-enter to open new tab would always be on (is that a bad idea?). It also means that you could easily get tabs instead of windows by default. jag? thoughts?
Now the current pref toggles between Ctrl+Enter opening a new window or tab. So you are sugesting that Shift+control+enter does the oposite of the pref? Tnd the new pref should toggle between opening in current window/tab and shift enter doing the opisite? That could be useful. Re: The patch, The change in the prefs screen actually seems to imply that with the pref turned off, enter will open aurl in a new window, and that's not true. i'll change the screen a bit to make it no longer lie.
This paatch, in theroy, uses shift to negate enter and conrol enter preferences. It assumes that if browser.tabs.opentabfor.urlbar is false then Control+Enter opens the url in a new window. Can someone verify that the normal behaviour of Control enter is open the URL in a new window? If not, then the prefs screen is lying (as in "Open tabs instead of windows for ... Control+Enter in URL Bar") Issues: * Shift enter doesn't actually appar to be doing anyhting on enter (I'm nto sure if shift Enter works on OSX either, will look itno this) * I only check for aTriggeringEvent once, I should be checking it in each of the ORed sections when it's needed. * Can someone verify that the following is a valid check for shift not being pressed: 'shiftKey' in aTriggeringEvent && !aTriggeringEvent.shiftkey || !'shiftKey' in aTriggeringEvent * I havn't actually checked the XUL changes to make sur hey work (I moved the checkbox out of the grouping) I won't obsolete the first patch yet, as someone may decide this shift thing is a bad idea.
Can someone please flag the seccond attachment as needs work? (and who do I ask to give me permission to edit attachments?)
Comment on attachment 66729 [details] [diff] [review] Patch that 9in theory) adds shift to negate tab preferences per request, needs work I think you misunderstood Boris, btw, but I'll let him explain.
Attachment #66729 - Flags: needs-work+
Comment on attachment 66592 [details] [diff] [review] Version 1 of pach to allow new tabs on enter I like this patch better, I think, but I suggest we hold off on adding new UI for this feature until we've got a spec for this feature and its UI.
Attachment #66592 - Flags: needs-work+
I think you misunderstood me too.. :) My suggestion was that we have, by default: Enter opens in same tab, ctrl-enter opens in new tab. And we have a preference for "enter opens new tab". When that's set, Enter opens in new tab, ctrl-enter opens in same tab. The hard part in this setup is letting people know that ctrl-enter will do something interesting (since the pref text will not naturally include it)...
Am I wrong in thinking that there are three states we are looking at? Currently we have 1) URLbar opens into new window on ctrl-enter (opentabfor.urlbar=false) 2) URLbar opens into new tab on ctrl-enter (opentabfor.urlbar=true) 3) URLbar opens into current window/tab on enter (opentabfor.urlbar=[true|false]) As odd as it seems we are probably looking at using ctrl-enter and shift-enter and letting the user assign through a pref set which key does what. 1) URLbar opens into new window on ______ 2) URLbar opens into new tab on ______ 3) URLbar opens into current window/tab on ______ Where the user selects one of enter, ctrl-enter, or shift-enter for each. This would, of course, require some sanity checking to make sure that each choice is only used once.
> 1) URLbar opens into new window on ctrl-enter (opentabfor.urlbar=false) We don't currently have this. If opentabfor.urlbar=false, we treat ctrl-enter and enter exactly the same.
Oh, good(?). Nevermind, cary-on, forget my last comment.
Ahh ,yes, I did misunderstand Boris :) So ratehr than having two choices, We only have one allowing for toggling enter and Control enter to open tab in new window. What's the best way to do this? One way is to remove browser.tabs.opentabfor.urlbar, and use browser.tabs.opentabfor.urlbarenter to indicate that we are toggling the two. This way Control+enter doesn't suddenly stop working for users who expect it to. Can someone sugest a better name for the pref, or is the name I chose fine? I'll create two prefs later on today, one that only removes the open URL on Control Enter field in the Prefs pannel, and one with the UI changes to allow the two to be swapped.
This is jsut a version of attachment 66592 [details] [diff] [review] without the UI in the prefs pannel. I havn't gotten around to doing a new version that swaps between Ctrl+enter openign a new tab and enter openign in current tab and enter opening a new tab and Ctrl+enter openign in current window. (Can someone please obsolete patch 66592)
Attachment #66592 - Attachment is obsolete: true
Marcus: Is the patch ready to get r, sr and checkin?
Attachment 66851 [details] [diff] Adds a pref for Enter to open a new URL in a tab, without UI. As far as i know, it's ready to go. the rest of it (using the pref to toggle between enter or Ctrl enter to open a new tab) seems to be part of the re-open of bug 105537
*** Bug 129144 has been marked as a duplicate of this bug. ***
*** Bug 139729 has been marked as a duplicate of this bug. ***
Attachment #66729 - Attachment is obsolete: true
New version of previous patch that applies correctly to latest trunk.
Attachment #66851 - Attachment is obsolete: true
Jag, bzbarsky Is this patch okay for r/sr?
So when the pref is set, ctrl-enter, enter, alt-enter will all open a new tab, right? Is that the desired behavior?
Good point, I'll add checks to exclude Ctrl enter (unless the ctrl enter pref is also set) and Alt Enter. Patch comign soon.
Is it possible to do a simple check to see if any modifiers are pressed (or if none were pressed), or do I need to check each one individually? (Or can anyone point to a resource where I can find this out?)
I think you need to check every one individually....
QA Contact: sairuh → pmac
I haven't used Mozilla for a while. It's not an issue for me. Feel free to close or take as you wish
Assignee: mpal1+bugzilla → nobody
Status: ASSIGNED → NEW
Filter on "Nobody_NScomTLD_20080620"
QA Contact: pmac → tabbed-browser
Product: Core → SeaMonkey
I'm closing this as WONTFIX. I don't think this should be in core code and it certainly sounds like extension fodder e.g. the Tab Clicking Options Extensions.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: