Open Bug 240511 Opened 21 years ago Updated 2 years ago

option to disable javascript focus() in onload script when travelling through history

Categories

(Core :: DOM: Core & HTML, enhancement, P5)

enhancement

Tracking

()

People

(Reporter: bmo, Unassigned)

References

(Blocks 1 open bug, )

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113 it can be quite annoying when you click a link mid-way down a long web page, decide you want to go back to the long page, hit the back button, and find yourself scrolled back to the top of the page. this is exactly what can happen with the given URL. see bug 236971 for the discussion of why. apparently mozilla is trying to protect the user by scrolling the page to the form control that was javascript focus()'d during onload. it would be great if there were a pref that would turn this behavior off when travelling through the user's history. Reproducible: Always Steps to Reproduce:
Not a session history issue. This would need to happen in the DOM code (which can ask the docshell what sort of load is being done). For what it's worth, I think this is an excellent idea.... jst? Thoughts?
Assignee: nobody → general
Status: UNCONFIRMED → NEW
Component: History: Session → DOM
Ever confirmed: true
QA Contact: core.history.session → ian
*** Bug 243129 has been marked as a duplicate of this bug. ***
Summary: RFE: option to disable javascript focus() in onload script when travelling through history → option to disable javascript focus() in onload script when travelling through history
Blocks: 251784
i'm wondering if perhaps this is really a design flaw (ie: bug) instead of a feature request. should the javascript onload stuff even be relevant when you go back to a page? is that really a page "load"?
(In reply to comment #3) > i'm wondering if perhaps this is really a design flaw (ie: bug) instead of a > feature request. should the javascript onload stuff even be relevant when you > go back to a page? is that really a page "load"? Would fastback (ref Bug 274784) indirectly fix this bug once it is enabled by default, as it would not fire the onload event for history traversal?
Assignee: general → nobody
QA Contact: ian → general
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046 Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5. If you have questions, please contact :mdaly.
Priority: -- → P5
Component: DOM → DOM: Core & HTML
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.