Closed Bug 299673 Opened 20 years ago Closed 16 years ago

Using the tab button to trigger a dropdown onchange event which generates a new page. Then call focus on the field in the new page. Try to enter data.

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

defect
Not set
major

Tracking

()

RESOLVED FIXED
mozilla1.9.2a1

People

(Reporter: thegame_911, Unassigned)

References

(Depends on 1 open bug)

Details

(Keywords: testcase)

Attachments

(6 files)

User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322) Build Identifier: Use the following example. Change the dropdown value to trigger a new window. <html> <head> <title></title> <script language="javascript"> function OpenWindow() { var popup = window.open("","Test"); var output = "<html>"; output+="<body>"; output+="<form name = 'myForm'>" output+="<INPUT id='myId' type='text' name='myText'>"; output+="</body>"; output+="</form>" output+="<html>"; popup.document.open(); popup.document.write(output); popup.document.close(); var e = popup.document.getElementById('myId'); popup.focus(); e.focus(); } </script> </head> <body> <SELECT id="Select1" name="Select1" onchange="OpenWindow()"> <OPTION selected>option1</OPTION> <OPTION>option2</OPTION> </SELECT> <INPUT id="Text1" type="text" name="Text1" onchange="OpenWindow()"> <INPUT id="Text2" type="text" name="Text2"> </body> </html> Reproducible: Always Steps to Reproduce: 1. Use the example in the details window. Change the dropdown from option1 to option2. 2. Try to enter data in the new window that appears. Actual Results: The new input field does not allow data. Expected Results: The new input field should have allowed data.
*** This bug has been marked as a duplicate of 299672 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
Example of the problem, toggle the dropdown and try to enter data.
Status: RESOLVED → UNCONFIRMED
Resolution: DUPLICATE → ---
*** Bug 299672 has been marked as a duplicate of this bug. ***
Sorry I submitted this twice by accident.
Attachment #188236 - Attachment description: Example of the problem, toggle the dropdown and try to enter data. → Example of the problem, 'TAB' to the dropdown, change the value and 'TAB' away from the dropdown. try to enter data in the new window
Summary: Calling the Focus method on new dynamicly generated pages causes the field to not allow input. → Using the tab button to trigger a dropdown onchange event which generates a new page. Then call focus on the field in the new page. Try to enter data.
still see this problem when using FF 3.5 beta (or 3.0?) http://www.mozilla.com/en-US/firefox/all-beta.html
Component: General → Tabbed Browser
Whiteboard: closeme 2009-05-24
Attached file Same example, with some event tracing (deleted) —
With "open new window in tab" pref on (Linux trunk): 31:517 SELECT(Select1): focus 32:410 SELECT(Select1): change 32:411 : >>> OpenWindow 32:425 [object HTMLDocument @ 0x1794450 (native @ 0xd11000)]: focus 32:489 [object HTMLDocument @ 0x1794450 (native @ 0xd11000)]: blur 32:569 INPUT(myId): focus 32:571 : <<< OpenWindow 32:572 SELECT(Select1): blur 32:574 INPUT(myId): blur 32:575 [object HTMLDocument @ 0x1af7f20 (native @ 0x1ae4740)]: blur 32:576 [object HTMLDocument @ 0x1794450 (native @ 0xd11000)]: focus 32:577 INPUT(Text1): focus It seems like a bug that "INPUT(myId)" is blurred. With "open new window in tab" pref off: 18:746 SELECT(Select1): focus 20:466 SELECT(Select1): change 20:467 : >>> OpenWindow 20:700 [object HTMLDocument @ 0x1762b10 (native @ 0xcc42a0)]: blur 20:704 [object HTMLDocument @ 0x1caf290 (native @ 0x11038a0)]: focus 20:720 : <<< OpenWindow 20:722 SELECT(Select1): blur 20:723 [object HTMLDocument @ 0x1caf290 (native @ 0x11038a0)]: blur 20:760 [object HTMLDocument @ 0x1caf290 (native @ 0x11038a0)]: focus Seems better, but where did the "INPUT(myId): focus" go?
Component: Tabbed Browser → Event Handling
Keywords: testcase
OS: Windows XP → All
Product: Firefox → Core
QA Contact: general → events
Hardware: x86 → All
Whiteboard: closeme 2009-05-24
Attached patch wip (deleted) — Splinter Review
This fixes the "open new window in a tab" case...
Attached patch wip2 (deleted) — Splinter Review
This fixes the "open new window in a window" case... and combined with the last patch it appears to fix the bug without regressions...
Attached patch more wip (deleted) — Splinter Review
It appears this bug will be fixed by bug 178324.
Depends on: 178324
Attached patch mochitest4.diff (deleted) — Splinter Review
Flags: in-testsuite?
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago16 years ago
Flags: in-testsuite? → in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.2a1
Version: unspecified → Trunk
Depends on: 504626
Depends on: 497839
Depends on: 506175
No longer depends on: 497839
Depends on: 521355
Depends on: 553417
I disabled the tests since they are perma/random-orange. Filed bug 553417 to write new tests.
Flags: in-testsuite+
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: