Closed Bug 367719 Opened 18 years ago Closed 18 years ago

xf:input for xul can't be readonly

Categories

(Core Graveyard :: XForms, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: surkov, Assigned: surkov)

References

()

Details

(Keywords: fixed1.8.0.12, fixed1.8.1.4)

Attachments

(2 files)

1017 bytes, patch
aaronr
: review+
smaug
: review+
Details | Diff | Splinter Review
1.63 KB, application/vnd.mozilla.xul+xml
Details
 
Attached patch patchSplinter Review
Attachment #252314 - Flags: review?(aaronr)
Attachment #252314 - Flags: review?(Olli.Pettay)
Status: NEW → ASSIGNED
Attachment #252314 - Flags: review?(Olli.Pettay) → review+
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.
Attachment #252314 - Flags: review?(aaronr) → review-
(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 :)
Blocks: 367826
(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

Attachment #252314 - Flags: review- → review+
needs to be checked in
Attached file testcase
checked in trunk by aaron
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Whiteboard: xf-to-branch
checked into 1.8 branch on 2007-04-12
checked into 1.8.0 branch on 2007-04-16
Whiteboard: xf-to-branch
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: