Closed
Bug 1438133
Opened 6 years ago
Closed 6 years ago
Ctrl + Enter should cause keypress event even after fixing bug 968056
Categories
(Core :: DOM: UI Events & Focus Handling, enhancement, P2)
Core
DOM: UI Events & Focus Handling
Tracking
()
RESOLVED
FIXED
mozilla60
Tracking | Status | |
---|---|---|
firefox60 | --- | fixed |
People
(Reporter: masayuki, Assigned: masayuki)
References
Details
Attachments
(1 file)
On the other browsers, it depends on the platform when Enter key causes keypress event. I think that basically, we shouldn't fire keypress event for Enter key unless it causes breaking line in <textarea> or contenteditable element. (Especially, even Chrome fires keypress event for Enter key with some modifiers, it doesn't modify both editors.) However, for compatibility, we should keep dispatching keypress event for Ctrl + Enter since Ctrl + Enter causes keypress event on any browsers with any platforms. I believe that we don't need to emulate inconsistency between platforms of Chrome.
Assignee | ||
Comment 1•6 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=54fc3e3d05d7b9b50d75b241b5aca8fb0ff9b21f
Updated•6 years ago
|
Priority: -- → P2
Assignee | ||
Comment 2•6 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=38edbc920647851d4ed3dc717df2ba7455a25ca1
Comment hidden (mozreview-request) |
Comment 4•6 years ago
|
||
mozreview-review |
Comment on attachment 8951524 [details] Bug 1438133 - Ctrl + Enter should cause keypress event even though the key combination doesn't input any character https://reviewboard.mozilla.org/r/220822/#review227048 ::: widget/TextEvents.h:255 (Diff revision 1) > MODIFIER_META | > MODIFIER_OS)); > } > > + /** > + * ShouldKeyPressEventBeFiredOnContent() should be called only when the This is inconsistent with the actual method name. I think using ShouldKeyPressEventBeFiredOnContent as the method name would be good. ::: widget/TextEvents.h:266 (Diff revision 1) > + MOZ_DIAGNOSTIC_ASSERT(mMessage == eKeyPress); > + if (IsInputtingText() || IsInputtingLineBreak()) { > + return true; > + } > + // Ctrl + Enter won't cause actual input in our editor. > + // However, the other browsers fires keypress event in any platforms. s/fires/fire/ ::: widget/TextEvents.h:268 (Diff revision 1) > + return true; > + } > + // Ctrl + Enter won't cause actual input in our editor. > + // However, the other browsers fires keypress event in any platforms. > + // So, for compatibility with them, we should fire keypress event for > + // Ctrl + Enter too. Since this is really odd behavior, could you file a spec bug to define this there too.
Attachment #8951524 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 5•6 years ago
|
||
mozreview-review-reply |
Comment on attachment 8951524 [details] Bug 1438133 - Ctrl + Enter should cause keypress event even though the key combination doesn't input any character https://reviewboard.mozilla.org/r/220822/#review227048 > Since this is really odd behavior, could you file a spec bug to define this there too. Filed: https://github.com/w3c/uievents/issues/183
Comment hidden (mozreview-request) |
Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/cb4185c40f3d Ctrl + Enter should cause keypress event even though the key combination doesn't input any character r=smaug
Comment 8•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/cb4185c40f3d
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
Updated•5 years ago
|
Component: Event Handling → User events and focus handling
You need to log in
before you can comment on or make changes to this bug.
Description
•