Opened 5 years ago

Last modified 3 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 4 years ago by dylan

Milestone: tbd1.12

comment:2 Changed 4 years ago by dylan

Component: EventsDijit - Form
Owner: set to bill
Status: newassigned

I assume this is with dijit/form/TextBox and not with plain html form fields?

comment:3 Changed 3 years ago by dylan

Milestone: 1.131.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.