Closed
Bug 280038
Opened 20 years ago
Closed 20 years ago
Focusing out of <select> causes default attr to appear
Categories
(Core Graveyard :: XForms, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: stpride, Assigned: aaronr)
Details
Attachments
(2 files)
1.72 KB,
application/xhtml+xml
|
Details | |
6.32 KB,
patch
|
smaug
:
review-
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a6) Gecko/20050114
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a6) Gecko/20050114
Using an attribute as a reference in a <select> statement causes the default
attribute value to be elected when focus goes out of element. I'll attach a
testcase for more clarity.
Reproducible: Always
Reporter | ||
Comment 1•20 years ago
|
||
Should open with two selection boxes, both marked with "No" as the default.
Select "Yes" in the first selection box and then set focus outside the first
one (by tabbing or clicking elsewhere). The first selection box goes back to
the defualt attribute value of "No".
I debugged this last night. This bug is related to how the node values are set
by nsXFormsSelectElement. Most controls have gone to
nsXFormsUtils::GetNodeValue(mBoundNode) and
nsXFormsMDGEngine::SetNodeValue(mBoundNode) instead of doing it by hand.
Honestly, I don't know exactly what is going wrong, other than when the node
value is set now by ::WriteSelectedItems, it sets it just fine. But then when
the value is about to be read back in nsXFormsSelectElement::Refresh(), the act
of ennumerating the child node list will cause the string that held the value in
the textnode to be freed and re-assigned to its original value.
When I change to use the new approach noted above, the problem is corrected.
I will post a patch today.
This patch fixes the problem using the methods I noted earlier in the bug.
Attachment #172587 -
Flags: review?(smaug)
Updated•20 years ago
|
Summary: Focusin out of <select> causes default attr to appear → Focusing out of <select> causes default attr to appear
Comment 4•20 years ago
|
||
Comment on attachment 172587 [details] [diff] [review]
proposed fix
Isn't this breaking support for multiple selected values?
Attachment #172587 -
Flags: review?(smaug) → review-
Actually, doesn't break the support...we currently don't work with muliselect
list boxes -> https://bugzilla.mozilla.org/show_bug.cgi?id=278207. Do you want
me to hold off with this patch until that is fixed?
Comment 6•20 years ago
|
||
rather fix Bug 278207, it will probably help with this one too.
Updated•20 years ago
|
Attachment #172562 -
Attachment mime type: text/plain → application/xml+xhtml
Updated•20 years ago
|
Attachment #172562 -
Attachment mime type: application/xml+xhtml → application/xhtml+xml
Comment 7•20 years ago
|
||
If I'm right, this was fixed in Bug 278207.
Closing.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Updated•9 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•