Closed
Bug 309030
Opened 20 years ago
Closed 20 years ago
Don't scroll to found link on findbar close
Categories
(Toolkit :: Find Toolbar, defect, P1)
Toolkit
Find Toolbar
Tracking
()
RESOLVED
FIXED
mozilla1.8final
People
(Reporter: masayuki, Assigned: masayuki)
References
Details
(Keywords: regression, verified1.8)
Attachments
(2 files)
1.66 KB,
patch
|
mconnor
:
review+
|
Details | Diff | Splinter Review |
1.51 KB,
patch
|
masayuki
:
review+
mtschrep
:
approval1.8b5+
|
Details | Diff | Splinter Review |
If a link is found in FAYT mode, when Find Toolbar is closed, we set focus to
found link. But in this time, if the link is not in view, contents are scrolled
to found link. It should not be so. we should lock scroll when we set focus to
found link.
Assignee | ||
Updated•20 years ago
|
Status: NEW → ASSIGNED
Flags: blocking1.8b5?
Priority: -- → P1
Target Milestone: --- → Firefox1.5
Updated•20 years ago
|
Summary: Don't scroll to found link at FAYT finished. → Don't scroll to found link on findbar close
Comment 1•20 years ago
|
||
Personally, I find the current behavior pretty good (for FAYT).
Comment 2•20 years ago
|
||
Oh, nvm, i see the bug.
Assignee | ||
Comment 3•20 years ago
|
||
Attachment #196520 -
Flags: review?(mconnor)
Assignee | ||
Updated•20 years ago
|
Whiteboard: [needs review mconnor]
Comment 4•20 years ago
|
||
Comment on attachment 196520 [details] [diff] [review]
Patch rv1.0
>Index: toolkit/components/typeaheadfind/content/findBar.js
>===================================================================
>RCS file: /cvsroot/mozilla/toolkit/components/typeaheadfind/content/findBar.js,v
>retrieving revision 1.24
>diff -u -8 -p -r1.24 findBar.js
>--- toolkit/components/typeaheadfind/content/findBar.js 26 Aug 2005 04:21:37 -0000 1.24
>+++ toolkit/components/typeaheadfind/content/findBar.js 18 Sep 2005 11:52:02 -0000
>@@ -392,19 +392,27 @@ function delayedCloseFindBar()
> var findToolbar = document.getElementById("FindToolbar");
> var ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
> .getService(Components.interfaces.nsIWindowWatcher);
>
> if (window == ww.activeWindow) {
> var focusedElement = document.commandDispatcher.focusedElement;
> if (focusedElement && (focusedElement.parentNode == findToolbar ||
> focusedElement.parentNode.parentNode == findField)) {
>- if (gFoundLink)
>+ if (gFoundLink) {
>+ // Don't scroll to found link. If contents are scrolled by the user,
>+ // the scrolling is always occured after FAYT's scrolling.
>+ // So, we should not cancel user's operations.
>+ var suppressedScroll = document.commandDispatcher.suppressFocusScroll;
>+ if (!suppressedScroll)
>+ document.commandDispatcher.suppressFocusScroll = true;
> gFoundLink.focus();
>- else
>+ if (!suppressedScroll)
>+ document.commandDispatcher.suppressFocusScroll = false;
>+ } else
> window.content.focus();
this works, but I'd rather see the comment and style changed to the following:
if (gFoundLink) {
// block scrolling on focus since find already scrolls, further scrolling
// is due to user action, so don't override this
var suppressedScroll = document.commandDispatcher.suppressFocusScroll;
document.commandDispatcher.suppressFocusScroll = true;
gFoundLink.focus();
document.commandDispatcher.suppressFocusScroll = suppressedScroll;
}
else
Attachment #196520 -
Flags: review?(mconnor) → review+
Assignee | ||
Comment 5•20 years ago
|
||
Assignee | ||
Updated•20 years ago
|
Whiteboard: [needs review mconnor]
Assignee | ||
Comment 6•20 years ago
|
||
checked-in.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•20 years ago
|
Attachment #196617 -
Flags: review+
Attachment #196617 -
Flags: approval1.8b5?
Assignee | ||
Updated•20 years ago
|
Whiteboard: [needs approval]
Assignee | ||
Comment 7•20 years ago
|
||
The risk is low. And this is regression.
Updated•20 years ago
|
Flags: blocking1.8b5? → blocking1.8b5+
Comment 8•20 years ago
|
||
Comment on attachment 196617 [details] [diff] [review]
Patch for check-in
Approved for 1.8b5 per bug meeting
Attachment #196617 -
Flags: approval1.8b5? → approval1.8b5+
Updated•20 years ago
|
Whiteboard: [needs approval]
Updated•20 years ago
|
Keywords: fixed1.8 → verified1.8
Updated•17 years ago
|
Product: Firefox → Toolkit
You need to log in
before you can comment on or make changes to this bug.
Description
•