Opened 15 years ago

Closed 15 years ago

Last modified 11 years ago

#4834 closed defect (fixed)

maxlength problem in dijit.form.TextBox

Reported by: guest Owned by: Douglas Hays
Priority: high Milestone: 1.0
Component: Dijit - Form Version: 1.0
Keywords: maxlength Cc:
Blocked By: Blocking:


dijit.form.TextBox?, maxlength does not work in IE6, The attribute maxlength in TextBox? widget should be renamed to "maxLength" and the maxlength in the attributeMap should be modified as maxLength:"focusNode".

Attachments (1)

TextBox.js (4.4 KB) - added by guest 15 years ago.
The defect specified is fixed in this attached file

Download all attachments as: .zip

Change History (7)

Changed 15 years ago by guest

Attachment: TextBox.js added

The defect specified is fixed in this attached file

comment:1 Changed 15 years ago by Adam Peller

Owner: set to Adam Peller

comment:2 Changed 15 years ago by Adam Peller

Owner: changed from Adam Peller to Douglas Hays

Doug, the fix appears to be as simple as camel-casing maxLength, though I seem to remember that we deliberately left these in all lower-case. Plus, HTML should be case insensitive. Any idea what's going on here?

comment:3 Changed 15 years ago by Douglas Hays

Resolution: fixed
Status: newclosed

(In [11076]) Fixes #4834. Renamed maxlength to maxLength within dijit/.

comment:4 Changed 15 years ago by guest

Resolution: fixed
Status: closedreopened

According to bug 4834, it seems to be closed because closing comment says that the maxLength is not working in IE which has been fixed but it has still some problem. I took new nightly build release.

Suppose if I write this code then what do you think. It should have default value "te" in the text box. but it is displaying "testing testing" in IE 6 and "te" in Mozila. Like same I found one bug in dijit.form.DateTextBox?. In IE it is displaying good but in mozilla it is not displaying anything except single dark line.

code is:- input type="text" name="firstname" value="testing testing" dojoType="dijit.form.TextBox?" trim="true" onchange="myname();" propercase="true" maxLength="2"

• Browser type (IE 6.0, Firefox/5.0) • OS and OS Version (Microsoft windows 5.0 (XP) service pack 2) • Took the example from the dojo document and try to run it in IE and Firefox both. • [email protected]….

comment:5 Changed 15 years ago by Douglas Hays

Resolution: fixed
Status: reopenedclosed

The original problem is fixed. The differences that you are seeing are differences in how maxLength is interpreted by different browsers.

<input type="text" value="testing testing" maxLength="2">

shows the whole text in IE (but no more characters can be entered) and only te in FF. This is a user error since the web page author should have truncated the value.

comment:6 Changed 11 years ago by bill

Component: DijitDijit - Form
Note: See TracTickets for help on using tickets.