Opened 7 years ago

Closed 7 years ago

#16385 closed task (fixed)

use native keydown event rather than synthetic dojo/_base/connect._keypress event for monitoring ESCAPE and TAB

Reported by: bill Owned by: bill
Priority: undecided Milestone: 1.9
Component: Dijit Version: 1.8.1
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by bill)

Change dijit/popup, dijit/TooltipDialog, and dijit/InlineEditBox code that monitors ESCAPE and TAB keys to use the native keydown event. There's no reason to depend on the deprecated dojo/_base/connect code.

Note that the modules need to be changed together, otherwise pressing the ESCAPE key to stop editing an InlineEditBox will also close the Dialog or TooltipDialog etc., since the stopEvent() call in InlineEditBox is on a different event than the one the Dialog, TooltipDialog, etc. is listening to.

Change History (4)

comment:1 Changed 7 years ago by bill

Milestone: tbd1.9
Status: newassigned

comment:2 Changed 7 years ago by bill

Description: modified (diff)
Summary: dijit/popup: use native keydown event rather than synthetic dojo/_base/connect._keypress eventuse native keydown event rather than synthetic dojo/_base/connect._keypress event for monitoring ESCAPE and TAB

comment:3 Changed 7 years ago by bill

#16384 is a duplicate of this ticket.

comment:4 Changed 7 years ago by bill

Resolution: fixed
Status: assignedclosed

In [30070]:

Use keydown rather than synthetic dojo/_base/connect._keypress event for Dialog, TooltipDialog, InlineEditBox, and dijit/popup.

These modules need to be changed together so that when the user hits the ESCAPE key while an InlineEditBox is in edit mode, the Dialog or TooltipDialog doesn't close too. That will happen if the InlineEditBox calls event.stop() on a keydown event but the Dialog is listening to keypress, or vice-versa.

For some reason InlineEditBox was listening to both keypress and keydown; changed it to just listener keydown by removing the onkeypress data-dojo-attach-event from the template.

Also removed some strange code in Dialog from [6577] (refs #1027) that doesn't seem to be needed anymore.

Fixes #16385 !strict.

Note: See TracTickets for help on using tickets.