Closed
Bug 102440
Opened 23 years ago
Closed 7 years ago
Mozilla obeys invalid maxwidth attribute on text form controls
Categories
(Core :: Layout: Form Controls, defect, P4)
Core
Layout: Form Controls
Tracking
()
RESOLVED
FIXED
mozilla6
People
(Reporter: smoehle, Assigned: dbaron)
References
(Depends on 1 open bug, )
Details
(Keywords: dev-doc-complete, testcase)
Attachments
(3 files)
The above url has a form with an text input that has a maxwidth attribute: <INPUT TYPE="TEXT" NAME="email" SIZE="30" maxwidth="40"> As far as I can tell, there is no version of HTML that has a maxwidth attribute for text input controls. I think the author of the page probably meant maxlength, but I really am not sure. Mozilla, however, obeys this maxwidth attribute rendering the text control 40 pixels wide. In fact it takes it over the size attribute which has a reasonable value. As a result, the form is unusable in Mozilla as the text input control is far too narrow to actually type in. Both NN4 and Opera ignore the maxwidth attribute and render the text control 30 characters wide which is what I think Mozilla should do as well. Tested with Mozilla trunk build 2001092906 on Linux.
Reporter | ||
Comment 1•23 years ago
|
||
Comment 2•23 years ago
|
||
confirming. <div> elements do not seem to do maxwidth.. now, we have maxwidth in XUL, but I don't see how this would affect HTML elements....
Comment 3•23 years ago
|
||
The problem is the GfxText uses the nsBox for part of it's sizing and the method: nsIBox::AddCSSMaxSize(nsBoxLayoutState& aState, nsIBox* aBox, nsSize& aSize) Checks for a XULATom:maxwidth and name space none and it should really only be looking at the XUL namespace. Or somehow the nsBox needs to NOT do this when sizing an HTML control. Over to evaughan
Assignee: rods → evaughan
Comment 4•23 years ago
|
||
Reassigning to Alex.
Assignee: eric → alexsavulov
Target Milestone: --- → mozilla1.1
Comment 5•23 years ago
|
||
*** Bug 131597 has been marked as a duplicate of this bug. ***
Comment 6•23 years ago
|
||
I also see this on Win2k using RC1 (build id: 2002041711). This html: <input type="text" name="foo" maxwidth="3" size="5"> displays on mozilla as a VERY thin line. In IE 5.5 and netscape 4.7 it displays as a text box.
Comment 7•22 years ago
|
||
*** Bug 207373 has been marked as a duplicate of this bug. ***
Comment 10•21 years ago
|
||
We should just move the maxwidth XUL stuff into the XUL attribute-mapping code (which we should create).
Depends on: 216838
Updated•15 years ago
|
Assignee: alexsavulov → nobody
QA Contact: madhur → layout.form-controls
Comment 12•14 years ago
|
||
Comment 13•14 years ago
|
||
(In reply to comment #11) > *** Bug 645137 has been marked as a duplicate of this bug. *** Thanks, Boris. I just needed to use a different name, other than maxWidth, for my custom attribute name.
Assignee | ||
Comment 14•14 years ago
|
||
This started off as bug 644514 patch 2, but it really doesn't have anything to do with that bug, and a lot to do with this one, so let's put it here.
Assignee | ||
Updated•14 years ago
|
Flags: in-testsuite?
Comment 15•14 years ago
|
||
Comment on attachment 527168 [details] [diff] [review] patch r=me, but add some tests, please?
Attachment #527168 -
Flags: review?(bzbarsky) → review+
Comment 16•14 years ago
|
||
Comment on attachment 527168 [details] [diff] [review] patch > <html:input anonid="input" > class="autocomplete-textbox urlbar-input textbox-input uri-element-right-align" >- flex="1" allowevents="true" >+ style="-moz-box-flex: 1" allowevents="true" Instead of inline style please put this in toolkit/content/textbox.css
Updated•14 years ago
|
Keywords: dev-doc-needed
Assignee | ||
Comment 17•14 years ago
|
||
ok... I also had to put it in menulist.css, since menulist.xml doesn't use the textbox-input class.
Assignee | ||
Comment 18•14 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/5b0b236704da
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Priority: -- → P4
Hardware: x86 → All
Resolution: --- → FIXED
Target Milestone: Future → mozilla6
Comment 19•14 years ago
|
||
(In reply to comment #17) > ok... I also had to put it in menulist.css, since menulist.xml doesn't use the > textbox-input class. That might be a bug, or it might be a limitation of XBL1. I'll look into it.
Comment 20•14 years ago
|
||
Updated documentation by adding a note to Firefox 6 for developers; this was never documented as supported, so it's more of a relnote type issue.
Keywords: dev-doc-needed → dev-doc-complete
Comment 21•13 years ago
|
||
Mozilla/5.0 (Windows NT 5.1; rv:6.0) Gecko/20100101 Firefox/6.0 Verified issue on Windows XP, Windows 7, Mac OS X 10.6 and Ubuntu, using the test case from Comment 12. Setting resolution to VERIFIED FIXED.
Status: RESOLVED → VERIFIED
Comment 22•7 years ago
|
||
Pushed by frgrahl@gmx.net: https://hg.mozilla.org/comm-central/rev/d66359712971 Make nsBox more careful about accepting XUL attributes only on XUL elements. r=bzbarsky
Status: VERIFIED → RESOLVED
Closed: 14 years ago → 7 years ago
You need to log in
before you can comment on or make changes to this bug.
Description
•