mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-15 08:53:07 +09:00
Issue #2161 - Ctrl + Enter should cause keypress event even though the key combination doesn't input any character
Currently, we dispatch keypress event when Enter is pressed without modifiers or only with the Shift key (line break). However, other browsers dispatch keypress events for Ctrl + Enter also even if it doesn't cause any text input. So, we should fire keypress events for Ctrl + Enter, even in strict keypress dispatching mode. Note that with other modifiers, it depends on the browser and/or platform and we can't dispatch the event for consistent behavior. This means web developers shouldn't rely one keypress events to catch Alt + Enter, Meta + Enter and two or more modifiers + Enter. Based on BZ 1438133 Resolves #2161
This commit is contained in:
parent
b29522749a
commit
078b1b73dc
3 changed files with 187 additions and 2 deletions
|
|
@ -538,8 +538,7 @@ TextEventDispatcher::DispatchKeyboardEventInternal(
|
|||
|
||||
if (!sDispatchKeyPressEventNonPrintableInContent &&
|
||||
keyEvent.mMessage == eKeyPress &&
|
||||
!keyEvent.IsInputtingText() &&
|
||||
!keyEvent.IsInputtingLineBreak()) {
|
||||
!keyEvent.ShouldKeyPressEventBeFiredOnContent()) {
|
||||
keyEvent.mFlags.mOnlySystemGroupDispatchInContent = true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue