Closed
Bug 463202
Opened 17 years ago
Closed 17 years ago
Search engine box should be cleared when leaving the private browsing mode
Categories
(Firefox :: Private Browsing, defect)
Firefox
Private Browsing
Tracking
()
VERIFIED
FIXED
Firefox 3.1b2
People
(Reporter: flod, Assigned: ehsan.akhgari)
References
Details
(Keywords: privacy, verified1.9.1)
Attachments
(1 file, 2 obsolete files)
|
4.73 KB,
patch
|
Gavin
:
review+
mconnor
:
approval1.9.1b2+
|
Details | Diff | Splinter Review |
When you leave "private browsing" mode, the text in the search engine box should be cleared.
Right now, if you search something using the search engine box in private mode, when the normal session is restored the text is not deleted.
Updated•17 years ago
|
OS: Mac OS X → All
Hardware: Macintosh → All
| Assignee | ||
Updated•17 years ago
|
Assignee: nobody → ehsan.akhgari
Status: NEW → ASSIGNED
Target Milestone: --- → Firefox 3.1
| Assignee | ||
Comment 1•17 years ago
|
||
One liner plus a unit test.
Attachment #346666 -
Flags: review?(mconnor)
Updated•17 years ago
|
Attachment #346666 -
Flags: review?(mconnor) → review-
Comment 2•17 years ago
|
||
Comment on attachment 346666 [details] [diff] [review]
Patch (v1)
You need to null check BrowserSearch.searchBar, since it will be null when the search bar is customized away.
| Assignee | ||
Comment 3•17 years ago
|
||
(In reply to comment #2)
> (From update of attachment 346666 [details] [diff] [review])
> You need to null check BrowserSearch.searchBar, since it will be null when the
> search bar is customized away.
Done.
Attachment #346666 -
Attachment is obsolete: true
Attachment #346709 -
Flags: review?(gavin.sharp)
Comment 4•17 years ago
|
||
Hmm, I suppose we don't have to worry about search bar history because form history in general is not being not being saved? I think we also want to be clearing undo history as we do in the sanitize case, though:
http://mxr.mozilla.org/mozilla-central/source/browser/base/content/sanitize.js?mark=227#219
And actually, we can do both in one step by using searchbar.textbox.reset() instead of .value = "" and clear(). I could have sworn I'd fixed that sanitize code already...
| Assignee | ||
Comment 5•17 years ago
|
||
(In reply to comment #4)
> Hmm, I suppose we don't have to worry about search bar history because form
> history in general is not being not being saved? I think we also want to be
> clearing undo history as we do in the sanitize case, though:
>
> http://mxr.mozilla.org/mozilla-central/source/browser/base/content/sanitize.js?mark=227#219
>
> And actually, we can do both in one step by using searchbar.textbox.reset()
> instead of .value = "" and clear().
Done.
> I could have sworn I'd fixed that sanitize
> code already...
Check out bug 463474 :-)
Attachment #346709 -
Attachment is obsolete: true
Attachment #346724 -
Flags: review?(gavin.sharp)
Attachment #346709 -
Flags: review?(gavin.sharp)
| Assignee | ||
Comment 6•17 years ago
|
||
When bug 418874 is fixed, the comments in the test can be removed.
Blocks: 418874
Updated•17 years ago
|
Attachment #346724 -
Flags: review?(gavin.sharp) → review+
Comment 7•17 years ago
|
||
Comment on attachment 346724 [details] [diff] [review]
Patch (v1.2)
>+ // leave private browsing mode
>+ pb.privateBrowsingEnabled = false;
>+
>+ is(searchBar.value, "",
>+ "leaving the private browsing mode should clear the search bar");
>+ /*
>+ XXXehsan: uncomment this code when bug 418874 is fixed.
>+ can't use todo_is, because it would pass unexpectedly!
>+
>+ is(searchBar.textbox.editor.transactionManager.numberOfUndoItems, 0,
>+ "entering the private browsing mode should not reset the undo list of the searchbar control");
It's just a comment for now, but this should probably read:
>+ "leaving the private browsing mode should not reset the undo list of the searchbar control");
| Assignee | ||
Comment 8•17 years ago
|
||
Ah, thanks! Actually, it should read:
"leaving the private browsing mode should reset the undo list of the searchbar control"
;-)
Fixing upon landing.
Updated•17 years ago
|
Attachment #346724 -
Flags: approval1.9.1b2+
| Assignee | ||
Comment 9•17 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: Firefox 3.1 → Firefox 3.1b2
| Assignee | ||
Updated•17 years ago
|
Comment 10•17 years ago
|
||
> I could have sworn I'd fixed that sanitize code already...
Yeah, you asked me to put it in my patch for bug 409624! Not to worry, thanks for fixing Ehsan.
Comment 11•17 years ago
|
||
verified fixed using Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b2pre) Gecko/20081119 Minefield/3.1b2pre and Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b2pre) Gecko/20081119 Minefield/3.1b2pre.
Status: RESOLVED → VERIFIED
Updated•17 years ago
|
Keywords: verified1.9.1
| Assignee | ||
Comment 12•17 years ago
|
||
Mass moving of all Firefox::General private browsing bugs to Firefox::Private Browsing.
Component: General → Private Browsing
| Assignee | ||
Updated•17 years ago
|
QA Contact: general → private.browsing
You need to log in
before you can comment on or make changes to this bug.
Description
•