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.
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....
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
Reassigning to Alex.
*** Bug 131597 has been marked as a duplicate of this bug. ***
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.
*** Bug 207373 has been marked as a duplicate of this bug. ***
OS->all based on last 2 comments
We should just move the maxwidth XUL stuff into the XUL attribute-mapping code (which we should create).
(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.
Created attachment 527168 [details] [diff] [review] patch 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.
Comment on attachment 527168 [details] [diff] [review] patch r=me, but add some tests, please?
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
ok... I also had to put it in menulist.css, since menulist.xml doesn't use the textbox-input class.
(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.
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.
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.