[Webkit-unassigned] [Bug 167880] New: WebKit provides a keypress event with wrong which/keyCode/charCode directly after a composition started with ^, =?UTF-8?Q?=C2=B4?=, ` completes
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Feb 6 08:48:18 PST 2017
https://bugs.webkit.org/show_bug.cgi?id=167880
Bug ID: 167880
Summary: WebKit provides a keypress event with wrong
which/keyCode/charCode directly after a composition
started with ^,´,` completes
Classification: Unclassified
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: macOS 10.12
Status: NEW
Severity: Normal
Priority: P2
Component: Event Handling
Assignee: webkit-unassigned at lists.webkit.org
Reporter: Carsten.driesner at open-xchange.com
Entering text into a contenteditable=true HTML element by pressing one of the keys ^, ´, ` on the Mac (German keyboard) starts a composition session. If one presses a second key which won't create a single character with the first one (e.g. â), the following keypress event contains the data of the key that started the composition (not the data of the pressed key).
Example:
Use the web page www.danilatos.com/event-test/ExperimentTest.html which records the events that the browser provides if one enter text into a div with contenteditable=true.
1. Set the cursor into the "Editing" field
2. Press ´ which starts the composition
3. Press v which ends the composition
4. Look at the event recorded
You can see the following events (part of the whole event list):
...
keyup 86 (V)
input
DOMSubtreeModified
DOMCharacterDataModified
dom axctually changed
textInput
keypress 180 (´)
keydown 86 (V)
input
DOMSubtreeModified
DOMCharacterDataModified
dom actually changed
DOMSubtreeModified
DOMCharacterDataModified
dom actually changed
textInput
compositionend
...
The issue is related to the keypress event which reports that ´ was entered although V (correctly reported by keydown/keyup) would be correct. The properties which, keyCode, charCode contain the value of the compositionend data property. If one would use ^ to start the composition the following keypress event would contain 94 (^).
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170206/f35677a2/attachment.html>
More information about the webkit-unassigned
mailing list