Similar to bug 23485 . I'll attach a patch tonight.
Patch in a moment
Status: NEW → ASSIGNED
*** Bug 326822 has been marked as a duplicate of this bug. ***
in addition to the search bar, what about the URL bar, which (I think) does an "I'm feeling lucky" google search if no matching hostname is found. or if someone does a keyword search in the URL bar.
Summary: search bar should replace newlines in pasted text with spaces → search bar [and url bar?] should replace newlines in pasted text with spaces
Seth: I fixed that in bug 23485 and bug 253481. This bug should use the same backend work. Unfortunately the straightforward method didn't seem to work, I think the search box uses a different xbl binding for its textbox. I need to look into it.
*** Bug 352348 has been marked as a duplicate of this bug. ***
moving it on to my list, for when I return to the trunk. I'd really like to fix this, as I run into all the time!
Assignee: nobody → sspitzer
Status: ASSIGNED → NEW
Should be pretty easy (see the patch from bug 23485), but you might need to change it in the searchbox binding.
Summary: search bar [and url bar?] should replace newlines in pasted text with spaces → search bar should replace newlines in pasted text with spaces
sorry for the bug spam, re-assigning bugs back to default owner if I'm not working actively on them.
Assignee: sspitzer → nobody
Assignee: nobody → ted.mielczarek
So going to fix this.
Status: NEW → ASSIGNED
Ok, got it. Turns out that doing the newline handling in the xul:textbox constructor didn't work for inherited bindings, since their html:input's .editor wasn't initialized at that point. Neil mentioned something about maybe xbl binding during frame construction. Anyway, I pulled that code out into a new method, and called it in a setTimeout from the constructor, and now it works for inherited bindings. The other line of this patch is actually setting newlines="replacewithspaces" in the xul:textbox inside the searchbar binding. I'm definitely going to write some unit tests for this before I get it checked in.
Makes a change gavin requested on irc, sets the newlines= on the searchbar element in browser.xul, and add newlines to the xbl:inherits in the searchbar binding.
Comment on attachment 279933 [details] [diff] [review] slight modification >Index: toolkit/content/widgets/textbox.xml >+ <method name="setNewlineHandling"> This isn't meant to be "public", so prefix the name with "_" please. r=me with that.
Attachment #279933 - Flags: review?(gavin.sharp) → review+
Ok, carrying forward review.
Attachment #279941 - Flags: approval1.9?
Attachment #279941 - Flags: approval1.9? → approval1.9+
Comment on attachment 279941 [details] [diff] [review] with review comment Checked in. Gavin, how about a review on that unit test?
Works in Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a8pre) Gecko/2007091804 Minefield/3.0a8pre.
Flags: in-litmus? → in-litmus-
Attachment #279998 - Flags: review?(gavin.sharp) → review+
Checked in the test.
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Flags: in-testsuite? → in-testsuite+
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.