Opened 10 years ago

Last modified 2 years ago

#9511 assigned defect

ctrl-punctuation normalization broken

Reported by: bill Owned by: Kris Zyp
Priority: high Milestone: 1.15
Component: Events Version: 1.3.0
Keywords: Cc:
Blocked By: Blocking:

Description

See enterKeyHandling.html for test case.

CTRL-equals on FF3.5 will produce evt(charOrCode="=", ctrlKey=true), as expected, but on IE6 it will produce an unexpected evt(charOrCode="+", ctrlKey=true),

CTRL-minus on FF3.5 will produce an unexpected evt(charOrCode=",").

Safari 4 is stranger, it produces two onkeypress events. For CTRL-equals it will produce an event with charOrCode="+" and another with charOrCode="=".

I'm not sure we need to support ctrl-punctuation, but there is code in events.js to support it:

// For IE and Safari: some ctrl-key combinations (mostly w/punctuation) do not emit a char code in IE
// we map those virtual key codes to ascii here
// not valid for all (non-US) keyboards, so maybe we shouldn't bother
_punctMap: { 
	106:42, 
	111:47, 
	186:59, 
	187:43, 
	188:44, 
	189:45, 
	190:46, 
	191:47, 
	192:96, 
	219:91, 
	220:92, 
	221:93, 
	222:39 
}

So, we should either get rid of the bugs, or get rid of the code.

Change History (7)

comment:1 Changed 10 years ago by bill

(In [18744]) Automated test for keyboard event handling, showing safari 4 problems with ESC and ctrl-q. Refs #9511, #9527, #9528.

Maybe this should be added to runTests.html although we don't have any robot tests in there currently.

comment:2 Changed 9 years ago by dante

Milestone: tbd1.5

comment:3 Changed 9 years ago by Adam Peller

Milestone: 1.51.6

comment:4 Changed 8 years ago by bill

Milestone: 1.6future

(sadly) punting seemingly abandoned ticket and meta tickets to future

comment:5 Changed 7 years ago by bill

Milestone: futuretbd
Owner: changed from sjmiles to Kris Zyp
Status: newassigned

Kris, what do you want to do with this one?

I know you hate the keypress/keydown normalization from the old dojo.connect() code.

OTOH, even with the new dojo/on module, CTRL-= gives inconsistent results for IE6 (keyDown event with keyCode=187) vs. for FF (keydown event with keyCode=61). (I'm ignoring the keypress event that occurs on firefox.) So, not sure how a dojo application is supposed to test for CTRL-=?

comment:6 Changed 3 years ago by dylan

Milestone: tbd1.12

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