Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#17055 closed defect (duplicate)

Forcing width on dijit/form/Select does not work

Reported by: dbsalgad Owned by:
Priority: undecided Milestone: tbd
Component: Dijit - Form Version: 1.8.3
Keywords: Cc: Douglas Hays
Blocked By: Blocking:

Description

As described in the docs (http://dojotoolkit.org/reference-guide/1.8/dijit/form/Select.html), I expected to be able to force the width of a Select widget by setting style.width of the Select's domNode, but upon selecting an item that contains text that overflows (longer than the forced width), the Select widget resizes to accommodate the selected item.

Thanks! You guys rock!

Change History (3)

comment:1 Changed 6 years ago by bill

Cc: Douglas Hays added
Component: GeneralDijit - Form
Resolution: duplicate
Status: newclosed

Duplicate of #10922.
Doug, the text claiming that setting width works was added in https://github.com/dojo/docs/commit/5ec6d73557f25b2413fe15415042ffa888fdc444#dijit/form/Select.rst, but it seems to just be wrong. Should we remove it until #10922 is fixed?

comment:2 Changed 6 years ago by Douglas Hays

Setting width works even in IE6 but it acts like min-width and not max-width.

<select data-dojo-type="dijit/form/Select" data-dojo-props='style:{width:"150px"}'>

dijit/tests/form/test_Select.html has the id=s3 widget that demonstrates this. #10922 is for autosizing.

comment:3 Changed 6 years ago by bill

Makes sense. I updated the title of #10922 to be clearer and will update the docs also.

Note: See TracTickets for help on using tickets.