Closed
Bug 568441
Opened 16 years ago
Closed 16 years ago
A textbox with focus that is disabled and re-enabled by script loses it's caret.
Categories
(Core :: Layout: Form Controls, defect)
Core
Layout: Form Controls
Tracking
()
RESOLVED
FIXED
mozilla2.0b4
| Tracking | Status | |
|---|---|---|
| blocking2.0 | --- | beta5+ |
People
(Reporter: hwiechers, Assigned: mounir)
Details
Attachments
(1 file)
|
2.60 KB,
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
A textbox with focus that is disabled and re-enabled by script loses it's caret.
Reproducible: Always
Steps to Reproduce:
1. Create a new html page with this content
<html>
<head>
<script type="text/javascript">
window.onload = function() {
input = document.getElementsByTagName('input')[0].onkeypress = function(e) {
if(e.keyCode == '13') {
this.setAttribute('disabled','true');
this.removeAttribute('disabled');
}
}
}
</script>
</head>
<body>
<p>Give the input below focus and push enter. The caret will disappear.</p>
<input id="input" value="xyz" />
</body>
</html>
2. Open the page
3. Tab to the textbox and press enter.
Actual Results:
The caret disappears. The textbox appears to work correctly besides that. Tabbing out of the text box and going back to it seems to restore the caret.
Expected Results:
The caret displays after the textbox is re-enabled.
| Assignee | ||
Comment 1•16 years ago
|
||
This is a simpler way to test the bug:
data:text/html,<html><body onload="var i=document.getElementById('i'); i.focus(); i.disabled=true; i.disabled=false;"><input id='i'>
You can copy this data url into your address bar. When loaded, if you start typing, you will type into the text field but the caret will not show.
Status: UNCONFIRMED → NEW
Component: General → Layout: Form Controls
Ever confirmed: true
OS: Windows 7 → All
Product: Firefox → Core
QA Contact: general → layout.form-controls
Hardware: x86_64 → All
| Assignee | ||
Comment 2•16 years ago
|
||
Attachment #463947 -
Flags: review?(roc) → review+
| Assignee | ||
Updated•16 years ago
|
Attachment #463947 -
Flags: approval2.0?
Updated•16 years ago
|
blocking2.0: --- → beta5+
Updated•16 years ago
|
Attachment #463947 -
Flags: approval2.0?
| Assignee | ||
Updated•16 years ago
|
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b4
| Assignee | ||
Updated•16 years ago
|
Flags: in-testsuite+
You need to log in
before you can comment on or make changes to this bug.
Description
•