Closed Bug 362251 Opened 18 years ago Closed 14 years ago

Text not entered in form when preventDefault is called

Categories

(Firefox :: General, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: mark_boudreau, Unassigned)

References

()

Details

(Whiteboard: [CLOSEME 2010-11-01])

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0

I noticed this when attempting to capture keypresses inside of a dynamically generated iframe.  After giving the iframe a "load" listener, and using the load listener to put a "keydown" listener on the iframe, I was not able to enter text into a form field when preventDefault() was called.

Reproducible: Always

Steps to Reproduce:
1. Create iFrame dynamically (body onload="createIframe()")
2. Add a load listener to that iFrame
3. In the load listener, add a keydown listener
4. Call preventDefault() in the keydown listener
5. Try to type in a form field

Actual Results:  
Nothing happens, see http://lyon.ftrd.us:8080/test/test.html or the attached testcase

Expected Results:  
You would be able to type in the box but other things such as spatial navigation (on the mobile) or other shortcut keys would be disabled
This is the testcase for the bug (if navigating to http://lyon.ftrd.us:8080/test/test.html doesn't work)
This is a mass search for bugs that are in the Firefox General component, are UNCO, and have not been changed for 1000 days and have an unspecified version. 

Reporter, can you please update to Firefox 3.6.10, create a fresh profile, http://support.mozilla.com/en-US/kb/managing+profiles, and test again. If you still see the bug, please update this bug. If the issue is gone, please set the resolution to RESOLVED > WORKSFORME.
Whiteboard: [CLOSEME 2010-11-01]
It's unclear whether or not this was a valid bug in the first place.

It seems that preventDefault() blocking text input is the intended behavior.  I was seeing weird issues when adding a javascript alert() to the click handler, but that is no longer happening.

Testing on other browsers leads to a problem with Javascript access across frames (even though they are local) so I cannot compare behavior.

Because I no longer see weird issues which prompted me to report this, I'm going to resolve this bug then.
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: