Closed Bug 277657 Opened 20 years ago Closed 19 years ago

(Xpfe) textbox.maxLength doesn't work

Categories

(Core :: XUL, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: BenB, Assigned: BenB)

References

Details

(Keywords: fixed1.7.6)

Attachments

(1 file)

Reproduction:

1. XUL: <textbox id="myTextbox" />
2. JS: document.getElementbyId("myTextbox").maxLength = 20;
3. Run, enter 30 characters in myTextbox.

Actual result:
Can enter 200 and more characters

Expected result:
Input stops working after 20 characters

Reason:
Case problem in code in xpfe/global/.

Attaching patch.
Attached patch Fix, v1Splinter Review
Attachment #170736 - Flags: superreview?(jag)
Attachment #170736 - Flags: review?(neil.parkwaycc.co.uk)
Comment on attachment 170736 [details] [diff] [review]
Fix, v1

Heh, I see aaronlev managed to fix the name of the xbl property but overlooked
the name on the input field.
Attachment #170736 - Flags: superreview?(jag)
Attachment #170736 - Flags: superreview+
Attachment #170736 - Flags: review?(neil.parkwaycc.co.uk)
Attachment #170736 - Flags: review+
Attachment #170736 - Flags: approval1.8a6?
Attachment #170736 - Flags: approval1.7.6?
Comment on attachment 170736 [details] [diff] [review]
Fix, v1

a=asa for checkin to 1.8a6
Attachment #170736 - Flags: approval1.8a6? → approval1.8a6+
checked into trunk
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Shouldn't this be fixed in toolkit's textbox.xml as well?
http://lxr.mozilla.org/seamonkey/source/toolkit/content/widgets/textbox.xml#50
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment on attachment 170736 [details] [diff] [review]
Fix, v1

a=mkaply for 1.7.6
Attachment #170736 - Flags: approval1.7.6? → approval1.7.6+
checked into 1.7 branch.
As I know when property 'maxLength' of html:input is chnaged then attribute
'maxlength' is changed too. By anology with html:input we can change property
'maxLength' of textbox. It can be look like:

<property name="maxLength"  onset="this.setAttribute('maxlength', val); return val;"
                            onget="return this.getAttribute('maxlength');"/>
Mike, could you fix toolkit too?
I filed bug 280485 on the toolkit version of this.
Blocks: 280485
Status: REOPENED → RESOLVED
Closed: 20 years ago19 years ago
Hardware: PC → All
Resolution: --- → FIXED
Please add the appropriate "fixed" keywords when checking into a branch.
Keywords: fixed1.7.6
Summary: textbox.maxLength doesn't work → (Xpfe) textbox.maxLength doesn't work
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: