Closed Bug 126850 Opened 23 years ago Closed 23 years ago

<dialog> onload handler setting focus too soon

Categories

(Core :: XUL, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla0.9.9

People

(Reporter: law, Assigned: law)

References

Details

Attachments

(2 files)

During investigation of some tab-panel textbox focusing issues related to bug 103197 (and the various bugs it blocks), we (Jag and I) decided to apply a comprehensive fix to all <dialog>s by doing the focus initializatio logic via a setTimeout. This seems to fix the problem when it appears in a <dialog>. It does not fix the problem when it occurs in <window>s, such as the Address Book New Card window. Patch forthcoming. Jag has reviewed and we will be asking Joe Hewitt to sr= it. We've tested this with a smattering of dialogs (text zoom, preferences, composer table dialog, new page setup dialog, etc.) and no regressions were evident.
Attached patch Fix, v1.0 (deleted) — Splinter Review
Nominating; this is necessary to land the updated page setup dialog. It may fix other dialog focusing problems elsewhere.
Blocks: 113727
Severity: trivial → major
Keywords: nsbeta1
Priority: -- → P1
Target Milestone: --- → mozilla0.9.9
Comment on attachment 70628 [details] [diff] [review] Fix, v1.0 sr=jag if you remove the postLoadInitFocus method :-)
Attachment #70628 - Flags: review+
nsbeta1+ per Nav triage team
Keywords: nsbeta1nsbeta1+
Yes! I knew it would be better to fix this for everyone in XBL.
Of course, this doesn't fix those people who haven't converted their dialogs to the <dialog> tag yet.
Comment on attachment 70631 [details] [diff] [review] patch, v2.0 (without the extraneous stuff) sr=hewitt
Attachment #70631 - Flags: superreview+
Comment on attachment 70631 [details] [diff] [review] patch, v2.0 (without the extraneous stuff) r=jag
Attachment #70631 - Flags: review+
Attachment #70631 - Flags: approval+
Comment on attachment 70631 [details] [diff] [review] patch, v2.0 (without the extraneous stuff) a=asa (on behalf of drivers) for checkin to 0.9.9
fix checked in
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
FYI: This is a good thing to do, but it does not fix the basic problem in bug 103197. Alas, individual dialogs that set focus to a particular element still need to also use "setTimeout". Interestingly, the setTimeout hack we added for Composer dialogs stopped working in the past few days, but the fix for this bug has now cured that!
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: jrgmorrison → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: