Last Comment Bug 367719 - xf:input for xul can't be readonly
: xf:input for xul can't be readonly
Status: RESOLVED FIXED
: fixed1.8.0.12, fixed1.8.1.4
Product: Core
Classification: Components
Component: XForms (show other bugs)
: Trunk
: All All
: -- normal (vote)
: ---
Assigned To: alexander :surkov
: Stephen Pride
Mentors:
https://bugzilla.mozilla.org/attachme...
Depends on:
Blocks: 367826
  Show dependency treegraph
 
Reported: 2007-01-22 01:35 PST by alexander :surkov
Modified: 2007-04-23 16:00 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (1017 bytes, patch)
2007-01-22 05:14 PST, alexander :surkov
aaronr: review+
bugs: review+
Details | Diff | Review
testcase (1.63 KB, application/vnd.mozilla.xul+xml)
2007-01-24 14:30 PST, aaronr
no flags Details

Description alexander :surkov 2007-01-22 01:35:09 PST
 
Comment 1 alexander :surkov 2007-01-22 05:14:54 PST
Created attachment 252314 [details] [diff] [review]
patch
Comment 2 aaronr 2007-01-22 13:26:36 PST
Comment on attachment 252314 [details] [diff] [review]
patch

from what I see in the code, the xhtml input sets the 'readonly' attribute directly on the xf:input, not on the underlying control.  And it either sets the readonly attribute to the value 'readonly' or removes the attribute.

The xhtml way sounds more correct to me, but either way, we need to be more consistent between the xhtml and xul implementation, I'd think.
Comment 3 alexander :surkov 2007-01-22 18:17:30 PST
(In reply to comment #2)
> (From update of attachment 252314 [details] [diff] [review])
> from what I see in the code, the xhtml input sets the 'readonly' attribute
> directly on the xf:input, not on the underlying control.

We don't set 'readonly' for xf:input, we set it on html:input.

>  And it either sets
> the readonly attribute to the value 'readonly' or removes the attribute.

For XUL I set 'readonly' attribute for xul:textbox. XUL specifity is readonly attribute value has boolean type, i.e. 'readonly' value doesn't work properly.

> The xhtml way sounds more correct to me

That's interesting, please give more details :)
Comment 4 aaronr 2007-01-23 00:36:46 PST
(In reply to comment #3)
> (In reply to comment #2)
> > (From update of attachment 252314 [details] [diff] [review] [details])
> > from what I see in the code, the xhtml input sets the 'readonly' attribute
> > directly on the xf:input, not on the underlying control.
> 
> We don't set 'readonly' for xf:input, we set it on html:input.

You are right, of course.  Reading this cryptic JS hurts my head! r=me

Comment 5 alexander :surkov 2007-01-24 06:26:02 PST
needs to be checked in
Comment 6 aaronr 2007-01-24 14:30:01 PST
Created attachment 252677 [details]
testcase
Comment 7 alexander :surkov 2007-01-24 19:31:19 PST
checked in trunk by aaron
Comment 8 aaronr 2007-04-23 16:00:34 PDT
checked into 1.8 branch on 2007-04-12
checked into 1.8.0 branch on 2007-04-16

Note You need to log in before you can comment on or make changes to this bug.