Opened 7 years ago

Last modified 5 years ago

#18388 new defect

shift detection on Button click event is broken in 1.10.2

Reported by: gstowe Owned by:
Priority: undecided Milestone: 1.15
Component: Dijit - Form Version: 1.10.2
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by bill)

This appears to have been introduced by the following checkin:

User Rick Lacy on the community forum writes:

In _ButtonMixin.js there is an internal __onClick method. When this gets a hold of the click event, it tries to call the click method on some hidden value dom node. The trouble is, I don't think passing e to this click method does anything. The real event is clobbered and by the time your code executes, it's this new event.


 __onClick: function(/*Event*/ e){ 
                        /* summary: 
                        	Internal function to divert the real click onto the hidden INPUT that has a native default action associated with it 

                                /* cannot use on.emit since button default actions won't occur 
                      ; Try to skip this since clobbering items on event.  Does click() on dom node even take an event? */
                        return false; 

Change History (5)

comment:1 Changed 7 years ago by gstowe

(I'm not sure when this stopped working. I jumped from 1.7.2, when it worked, to 1.10.2 where it does not. Same code, just changed out the dojo versions. A click handler on a Button, executed with the shift key down shows shiftKey=true in 1.7.2 and shiftKey=false in 1.10.2.)

comment:2 Changed 7 years ago by bill

Description: modified (diff)

As that check-in comment implies, the idea is to have form submission etc. work correctly, for a normal non-shift click of a button in a form.

If the user does a shift-click on a button, I'm not sure what's supposed to happen. Is that supposed to submit the form (if the button is type=submit and inside a form)? If not, we could just call _onClick(e) in that case.

comment:3 Changed 6 years ago by dylan

Milestone: tbd1.11

Marking as 1.11, but we may push to 1.12.

comment:4 Changed 6 years ago by dylan

Milestone: 1.111.12

comment:5 Changed 5 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.