Closed
Bug 22264
Opened 26 years ago
Closed 26 years ago
Enabling GFX text field after disable does not work properly in mousewheel pref panel
Categories
(Core :: XUL, defect, P3)
Tracking
()
VERIFIED
WORKSFORME
M14
People
(Reporter: bugs, Assigned: saari)
Details
(Whiteboard: [PDT+] asked ben for helping verifying fix)
Take the following code designed to work on a text field and a checkbox:
<html:input type="checkbox" id="checkboxID" onclick="toggleField();"/>
<html:input type="text" id="fieldID"/>
function toggleField()
{
var field = document.getElementById("fieldID");
var check = document.getElementById("checkboxID");
if( check.checked )
field.removeAttribute("disabled","true");
else
field.setAttribute("disabled","true");
}
this code should enable the textfield when the checkbox is checke, and disable
the textfield when the checkbox is unchecked.
Disabling works fine. Enabling on the other hand works oddly. The field isn't
immediately available to be clickable (behaving like a disabled checkbox)
however (on Win32) after the window loses focus and regains it, the field is
clickable. On Linux this doesn't happen, the field remains disabled.
There's something wacky here..
| Reporter | ||
Comment 1•26 years ago
|
||
Sorry, on Linux this *does* happen (with the field beign enabled when the window
loses and regains focus).
Updated•26 years ago
|
Assignee: trudelle → saari
Comment 2•26 years ago
|
||
Sounds like a focus issue, assigning to saari, cc hyatt & beppe
Comment 3•26 years ago
|
||
I did some preliminary debugging of this. It looks like what is happening is,
in nsEventStateManager::PreHandleEvent, the NS_GOTFOCUS event is being thrown
away (or at least, not processed in PreHandleEvent) because
gLastFocusedDocument==mDocument. What I see is, when the text control
successfully gets focus, there is one NS_GOTFOCUS event processed, and two
thrown away. When it does NOT get focus (i.e. when the bug exhibits itself), I
see 3 NS_GOTFOCUS events being thrown away.
| Assignee | ||
Updated•26 years ago
|
Status: NEW → ASSIGNED
Target Milestone: M14
| Assignee | ||
Comment 4•26 years ago
|
||
Hey cool, I think this is a dup of another bug I'm working on, but I'm not 100%
sure yet so I'm leaving this open.
Keywords: beta1
| Assignee | ||
Comment 6•26 years ago
|
||
In nsHTMLInputElement::SetFocus there was a short circuit if the text field was
disabled. While this makes sense logically, it confused the focus code by not
completeing the circuit and focus state got out of whack. Always completing the
circuit does the right thing.
Marking Fixed.
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Comment 7•26 years ago
|
||
ben does this work for you now?
Updated•26 years ago
|
Whiteboard: [PDT+] → [PDT+] asked ben for helping verifying fix
Comment 8•26 years ago
|
||
You can test this in the mousewheel prefs panel. If you check the "System
default" box, the "number of lines" field should disable; then if you uncheck
it, it should re-enable.
| Reporter | ||
Comment 9•26 years ago
|
||
this appears to still be busted (mousewheel pane). saari, if you like I can come
and show you exactly where this is happening, or demo on this machine. What's
interesting is that this isn't affecting the proxies panel, where similar code
is present... (changing summary line)
Summary: Enabling GFX text field after disable does not work properly. → Enabling GFX text field after disable does not work properly in mousewheel pref panel
Comment 10•26 years ago
|
||
Re-opening since this doesn't appear fixed per ben's comments
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
| Assignee | ||
Comment 11•26 years ago
|
||
I just tested the mousewheel prefs panel using linux, and it works fine for me.
Could be all the focus checkins we did today, I suggest you try again.
Marking worksforme
Status: REOPENED → RESOLVED
Closed: 26 years ago → 26 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•