Opened 6 years ago
Last modified 4 years ago
#18303 assigned defect
Regression : onkeypress not triggered on Firefox if focus is on an input Field
Reported by: | babynus | Owned by: | bill |
---|---|---|---|
Priority: | undecided | Milestone: | 1.15 |
Component: | Dijit - Form | Version: | 1.10.1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
I noticed a regression since V1.10.0, on Firefox only. The onkeypress connected on document (or on window) does not trigger when the focus is in an input field. If focus is outside an inout field, it works fine. Works fine with IE and Chrome. Also worked fine on V1.9.3. (I tested with V1.10.1 : issue still exists)
Here is a js exemple. Try and add a validationTextBox :
if focus in the textbox, then onkeypress is not triggered if focus outside the textbox, then onkeypress is not triggered
dojo.addOnLoad(function(){ var onKeyPressFunc = function(event) { console.log("onKeyPressFunc Window for key '"+event.keyChar+"'"); if(event.ctrlKey && event.keyChar == 's'){ event.preventDefault(); //globalSave(); } else if (event.keyCode==dojo.keys.F1 && ! event.keyChar) { event.preventDefault(); //showHelp(); } }; dojo.connect(document, "onkeypress", null, onKeyPressFunc);
Change History (3)
comment:1 Changed 5 years ago by
Milestone: | tbd → 1.12 |
---|
comment:2 Changed 5 years ago by
Component: | Events → Dijit - Form |
---|---|
Owner: | set to bill |
Status: | new → assigned |
comment:3 Changed 4 years ago by
Milestone: | 1.13 → 1.15 |
---|
Ticket planning... move current 1.13 tickets out to 1.15 to make it easier to move tickets into the 1.13 milestone.
Note: See
TracTickets for help on using
tickets.
I assume this is with dijit/form/TextBox and not with plain html form fields?