Closed
Bug 608111
Opened 14 years ago
Closed 14 years ago
Paste-and-go should appear when the clipboard's contents might reasonably be construed to be a URL
Categories
(Firefox :: Address Bar, defect)
Firefox
Address Bar
Tracking
()
RESOLVED
FIXED
People
(Reporter: justin.lebar+bug, Unassigned)
References
Details
(Whiteboard: [fixed by bug 611590])
Following up on bug 601695. Currently Paste & Go shows up only if the clipboard's contents start with "http://" or "https://". Strings that don't start with "http" but look like URLs should also trigger paste-and-go. Here's a regex for detecting URL-like things which is probably wrong: ^.*\.[a-zA-Z]{2} i.e. some characters followed by '.', followed by at least two letters. This would allow us to show paste-and-go for the strings "mozilla.co.uk" and "www.mozilla.com".
Comment 1•14 years ago
|
||
We should just use nsIURIFixup::createFixupURI rather than newURI().
Comment 2•14 years ago
|
||
Though that goes too far and turns "foo" into "http://foo/", which isn't quite what we want!
Comment 3•14 years ago
|
||
(In reply to comment #2) > Though that goes too far and turns "foo" into "http://foo/", which isn't quite > what we want! Yeah, which is why I did not object to using newURI(). Sigh.
Version: unspecified → Trunk
Comment 4•14 years ago
|
||
Not that i know anything about Coding, but what about using the Method of how Text-URLs are recognized on Selection & the Contextmenu Handling (open in new Tab etc.)?
Comment 5•14 years ago
|
||
(In reply to comment #4) I'll investigate what that 'Open Link' code does exactly. (In reply to bug 601695 comment #25) > I'd prefer disabling the menu item rather than hiding it. Hiding it made me > think Firefox didn't have the feature. (In reply to bug 601695 comment #26) > It's tricky, since if you disable it, it's not clear *why* it's disabled. That > is, people who interpret "Paste & Go" as "paste the clipboard's contents and > then go" could be disappointed when they select some part of what's in their > location bar, right-click it, and "Paste & Go" is mysteriously disabled. > > Anyway, I can see it going either way, personally. Limi, I think you had some thoughts about this.
Assignee: nobody → fryn
Status: NEW → ASSIGNED
Comment 6•14 years ago
|
||
The open link code does something crazy that I don't quite understand: http://hg.mozilla.org/mozilla-central/rev/c0dbbcfdb583
We could interpret "Paste & Go" wider to "Paste & Enter". Really unnecessary to analyze whether it's an url. We can just do "Paste" and "Send enter key", so it may be attached to any textbox.
Reporter | ||
Comment 8•14 years ago
|
||
(In reply to comment 7) We decided that this was the wrong thing to do, in bug 599793.
(In reply to comment #8) > We decided that this was the wrong thing to do, in bug 599793. Seems unrelated to comment 7. I meant no need to distinguish an url or not, unnecessarily making it too complicated. People can type any text than an url in the location bar.
Reporter | ||
Comment 10•14 years ago
|
||
The crux of bug 599793 was that we interpreted "paste & go" as "paste & enter", just as was suggested in comment 7. We decided that this was the wrong thing to do. See bug 599793 comment 9.
Comment 11•14 years ago
|
||
To clarify, I meant "Select all, Paste and Enter", whether an url or not.
Comment 12•14 years ago
|
||
Unassigning myself, since I think bug 611590 should have been a WONTFIX in the first place. I made the patch for bug 611590, since it was a blocker and assigned to me, but I really think we should be consistent in our menus. We should strictly adhere to the concept of a context menu being the menu that appears upon right-clicking a type of UI control. For example, to the user, the context menu of an image and that of a link are different menus. The menu items of a context menu should not appear and disappear depending on the contents of the clipboard. Items should be enabled or disabled depending on they are available for the current state of the control. By this rule, in the case of the url bar, the context menu should always contain Paste & Go. The question becomes: when should it be enabled? Always; the menu item will always 'go' as in navigate to an address that is predictable, because pressing the 'Go' button would do the exact same thing (having pasted the clipboard contents). Limi, as a member of the UX team, your input would be appreciated.
Assignee: fryn → nobody
Status: ASSIGNED → NEW
Comment 13•14 years ago
|
||
Er, I mean I think bug 601695 should be been a WONTFIX in the first place.
Comment 14•14 years ago
|
||
(In reply to comment #12) > Unassigning myself, since I think bug 611590 should have been a WONTFIX in the > first place. So do I. I have reopened it. Handling all these edge cases when we have a simple, predictable behavior baffles me. :) > Limi, as a member of the UX team, your input would be appreciated. The URL bar is also a search bar in Firefox 4. Thus, it should accept any input as Paste & Go.
Updated•14 years ago
|
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: [fixed by bug 611590]
You need to log in
before you can comment on or make changes to this bug.
Description
•