See bug 471322, ESC keypress event should clear the latest text input. And then, the editor should consume the event. And see bug 569988, ESC key is also used for closing dialog boxes, so, we need to think whether the ESC key feature is really needed or not, first. Currently, nsHTMLEditor consume the ESC keypress event always. However, nsPlaintextEditor doesn't consume it always.
I think the behavior of the Esc key should be consistent across HTML and plain text editors. I don't think that there is any reason for us eat the Esc element if it doesn't do anything.
Created attachment 451547 [details] [diff] [review] Patch v1.0 This patch cleans up the ESC key handling.
Assignee: nobody → masayuki
Status: NEW → ASSIGNED
Attachment #451547 - Flags: review?(ehsan)
Summary: Esc keypress event should be consumed by editor only when it's used for clear → Editor shouldn't do anything when ESC key is pressed because bug 471322 is marked as WONTFIX
Status: ASSIGNED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
Summary: Editor shouldn't do anything when ESC key is pressed because bug 471322 is marked as WONTFIX → Editor shouldn't do anything when ESC key is pressed because bug 471322 was marked as WONTFIX
Target Milestone: --- → mozilla1.9.3a6
No longer depends on: 572969
You need to log in before you can comment on or make changes to this bug.