Closed
Bug 160132
Opened 22 years ago
Closed 22 years ago
Need to strip linebreaks when pasting into url bar
Categories
(Camino Graveyard :: General, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
Chimera0.6
People
(Reporter: sfraser_bugs, Assigned: mikepinkerton)
Details
Attachments
(1 file, 2 obsolete files)
(deleted),
patch
|
Details | Diff | Splinter Review |
We need to strip CR/LF when pasting into the URL bar; we should either truncate
at the linebreak, or just strip it out (preferred) so that pasting 'broken' urls
works.
Assignee | ||
Comment 1•22 years ago
|
||
gor! i swear we used to do this
Status: NEW → ASSIGNED
Target Milestone: --- → Chimera0.4
Comment 2•22 years ago
|
||
./Navigator -url
"http://spider/page-loader/loader.pl?delay=1000&nocache=0&maxcyc=4&timeout=30000&auto=1"
This brings up the browser with the url bar displaying
"http://spider/page-"
I also notice that TextEdit will break this url up at the same '-'
place, I am guessing a similar behavior is happening here in the url bar.
Is this the same bug, or should I file a new one?
Reporter | ||
Comment 3•22 years ago
|
||
Same bug.
Comment 4•22 years ago
|
||
After applying patch in bug 161621, I typed in a text editor the following lines:
http://www.
apple.
com
then copied & pasted it into the URL bar and hit return. Apple's homepage came
up. So I think when the text view goes back to being a text field, this will be
fixed.
Depends on: 161621
Reporter | ||
Comment 5•22 years ago
|
||
> then copied & pasted it into the URL bar and hit return
What did it look like at this point? Did pasting remove linebreaks?
Comment 6•22 years ago
|
||
Nope.
Comment 7•22 years ago
|
||
I felt bad that I said the text field would fix this when it didn't. So I made
a patch which strips out control characters. Copying this:
http:
//
www.
apple.
com
and pasting into the URL bar results in a nice "http://www.apple.com"
This patch requires the patch from bug 161621 to work. In fact, it's a patch
of the patched CHAutoCompleteTextField.
Assignee | ||
Comment 8•22 years ago
|
||
can you explain this patch?
Assignee | ||
Comment 9•22 years ago
|
||
dave and i talked and he's going to come up with a new patch that doesn't impact
regular typing (override paste: on the field editor).
Comment 10•22 years ago
|
||
Subclassed the field editor we send to the URL bar, and overrode paste:
I tried it with stickies & bbedit lite - so I think it works with both
carbon & cocoa.
I've left the interface & implementation of this subclass in
BrowserWindowController.mm. Feel free to move it someplace else.
Attachment #95053 -
Attachment is obsolete: true
Assignee | ||
Updated•22 years ago
|
Target Milestone: Chimera0.4 → Chimera0.6
Comment 11•22 years ago
|
||
updated for new naming scheme. subclassed NSTextView still living in the BWC -
I wouldn't be surprised if you want it someplace else, but it's easy enough to
move.
Attachment #95191 -
Attachment is obsolete: true
Assignee | ||
Comment 12•22 years ago
|
||
landed with changes to the selection code.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Comment 13•22 years ago
|
||
You can still insert a line break with option-return, dunno if you want to trap
it specifically or perhaps with a delegate method, perhaps
-textView:shouldChangeTextInRange:replacementString: or whatever the textfield
equivalent is.
Comment 14•20 years ago
|
||
V/fixed. Camino 0.8.1
Mike, this is great. Sometimes the larger group of contributors just don't get
it (see how many bugs are duped to bug 23485 if you want to see how much pain
you have saved Camino users.
Status: RESOLVED → VERIFIED
QA Contact: winnie → benc
You need to log in
before you can comment on or make changes to this bug.
Description
•