Closed Bug 332811 Opened 19 years ago Closed 18 years ago

Backspace in readonly input triggers history.back() (part 2)

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

x86
Windows XP
defect
Not set
minor

Tracking

()

RESOLVED FIXED

People

(Reporter: martijn.martijn, Assigned: martijn.martijn)

References

Details

Attachments

(1 file, 1 obsolete file)

(deleted), patch
martijn.martijn
: review+
bzbarsky
: superreview+
Details | Diff | Splinter Review
Spin-off from bug 332345.

Currently, you can see the caret when a readonly text input has focus.
This can be confusing for the user, thinking he can erase any existing text, by pressing the backspace key. 
He would then be surprised to see he is going back in history instead.

So maybe just disable the backspace key for readonly inputs now?
Attached patch patch (obsolete) (deleted) — Splinter Review
This is the patch that would change that behavior.
No longer blocks: 332345
Attachment #217281 - Flags: review?(aaronleventhal)
Attachment #217281 - Flags: review?(aaronleventhal) → review?(mats.palmgren)
Comment on attachment 217281 [details] [diff] [review]
patch

Seems reasonable.
Please put the '{' on a separate line like the surrounding code.
r=mats with that.
Attachment #217281 - Flags: review?(mats.palmgren) → review+
Attached patch patch (deleted) — Splinter Review
> (From update of attachment 217281 [details] [diff] [review] [edit])
> Seems reasonable.
> Please put the '{' on a separate line like the surrounding code.
> r=mats with that.

Ok, done that.
Attachment #217281 - Attachment is obsolete: true
Attachment #237320 - Flags: superreview?(bzbarsky)
Attachment #237320 - Flags: review+
Comment on attachment 237320 [details] [diff] [review]
patch

Looks good!
Attachment #237320 - Flags: superreview?(bzbarsky) → superreview+
Checking in nsEditorEventListeners.cpp;
/cvsroot/mozilla/editor/libeditor/text/nsEditorEventListeners.cpp,v  <--  nsEdit
orEventListeners.cpp
new revision: 1.241; previous revision: 1.240
done

Checked into trunk.
Assignee: events → martijn.martijn
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
It's weird that backspace is handled by a key event but delete is a command...
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: