Closed
Bug 463635
Opened 16 years ago
Closed 16 years ago
All Tabs search doesn't always update on Enter
Categories
(Firefox :: Tabbed Browser, defect)
Firefox
Tabbed Browser
Tracking
()
VERIFIED
FIXED
Firefox 3.1b2
People
(Reporter: dao, Assigned: dao)
References
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
Gavin
:
review+
beltzner
:
approval1.9.1b2+
|
Details | Diff | Splinter Review |
From bug 436304 comment 41:
> * All Tabs search doesn't update on Enter. I.e. when searching a tab and
> quickly hitting Enter, a different tab is selected than when shortly pausing
> before hitting Enter.
Flags: blocking-firefox3.1?
Assignee | ||
Comment 1•16 years ago
|
||
Attachment #346894 -
Flags: review?(gavin.sharp)
Comment 2•16 years ago
|
||
Comment on attachment 346894 [details] [diff] [review]
patch
>diff --git a/browser/base/content/browser-tabPreviews.js b/browser/base/content/browser-tabPreviews.js
> case "keydown":
> case "keyup":
>+ if (event.keyCode == event.DOM_VK_RETURN) {
>+ // If there's a pending search, kick it off now.
>+ if (this.searchField._timer)
>+ this.search();
When wouldn't there be a search pending here?
And won't this mean we'll end up searching twice, once now and once when the timer fires? I guess selectThumbnail() closes the panel, which means the second search() will be a no-op because isOpen is false?
>+ event.stopPropagation();
Why is this needed?
Assignee | ||
Comment 3•16 years ago
|
||
(In reply to comment #2)
> >+ if (event.keyCode == event.DOM_VK_RETURN) {
> >+ // If there's a pending search, kick it off now.
> >+ if (this.searchField._timer)
> >+ this.search();
>
> When wouldn't there be a search pending here?
When hitting Enter without entering a search term, or when hitting Enter after the timer has ended.
> And won't this mean we'll end up searching twice, once now and once when the
> timer fires? I guess selectThumbnail() closes the panel, which means the second
> search() will be a no-op because isOpen is false?
Yes, it would be a no-op, but this.searchField.value = "" in onPopupHidden would also cancel the timer. Also, if the keypress event reaches the textbox, the timer would be canceled and search() would be called immediately, which would be a no-op as well.
> >+ event.stopPropagation();
>
> Why is this needed?
I think I wanted event.preventDefault() in order to suppress the keypress event, but this would leave the timer intact, so I can probably just remove that line.
Assignee | ||
Comment 4•16 years ago
|
||
without event.stopPropagation()
Attachment #346894 -
Attachment is obsolete: true
Attachment #346947 -
Flags: review?(gavin.sharp)
Attachment #346894 -
Flags: review?(gavin.sharp)
Updated•16 years ago
|
Attachment #346947 -
Flags: review?(gavin.sharp) → review+
Assignee | ||
Updated•16 years ago
|
Attachment #346947 -
Flags: approval1.9.1b2?
Comment 5•16 years ago
|
||
Comment on attachment 346947 [details] [diff] [review]
patch
a=beltzner
Attachment #346947 -
Flags: approval1.9.1b2? → approval1.9.1b2+
Assignee | ||
Updated•16 years ago
|
Keywords: checkin-needed
Assignee | ||
Comment 6•16 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 3.1b2
Assignee | ||
Updated•16 years ago
|
Flags: blocking-firefox3.1?
Assignee | ||
Updated•16 years ago
|
Flags: in-testsuite+
Comment 7•16 years ago
|
||
Verified with the following builds. The correct tab is chosen now even the search hasn't finished yet when pressing the Enter key.
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b2pre) Gecko/20081112 Minefield/3.1b2pre ID:20081112020254
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1b2pre) Gecko/20081112 Minefield/3.1b2pre ID:20081112034733
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•