Opened 12 years ago

Closed 12 years ago

Last modified 8 years ago

#4785 closed defect (duplicate)

ComboBox - expands as text is entered on IE

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

Description

As you type text past the visible width, the input field expands. This is not how the native field behaves and it causes layout problems.

Attachments (1)

patch.diff (1.5 KB) - added by guest 12 years ago.
possible fix

Download all attachments as: .zip

Change History (12)

comment:1 Changed 12 years ago by bill

Milestone: 1.01.1

Right, same issue as #4711. Don't think I'll have time to fix for 1.0 although I'd like to.

comment:2 Changed 12 years ago by bill

Owner: set to bill
Status: newassigned

comment:3 Changed 12 years ago by guest

Not until 1.1...ouch. This seems like a bad bug as in many forms you expect control over the width of the fields, having them change as a user selects different values from the dropdown is really ugly, especially if you have objects on the right side that you want to keep aligned.

comment:4 Changed 12 years ago by bill

Yes, I agree. Please provide a patch to fix the problem.

Changed 12 years ago by guest

Attachment: patch.diff added

possible fix

comment:5 Changed 12 years ago by guest

just uploaded a possible fix, not sure if it's the best approach though as it hard codes some widths that might make customization more difficult. Tested in IE and FF, fixes issue but makes the tall combo box (in test) look a little off.

comment:6 Changed 12 years ago by bill

Well, thanks for looking at that. The goal of using the table though is to be able to specify an outer width for the control, which is split between the input area and the button (giving as much of the width as possible to the input). If we hardcode widths then we lose that ability.

I think you can avoid this problem altogether by assigning an exact width to the <input> box (rather than the width=100% percentage), and setting the table's width to auto, but then it's hard to control the outer width of the control.

Also, you can workaround the problem by setting the maxlength parameter, to prevent people from typing enough text to overflow the input control (thus causing it to expand).

comment:7 Changed 12 years ago by guest

the input will still grow as the user specifies different widths, by customization I mean using a different drop down arrow or something (which might be wider then 25px).

comment:8 Changed 12 years ago by bill

Milestone: 1.11.0

Will check in fix from Doug.

comment:9 Changed 12 years ago by bill

Owner: changed from bill to Douglas Hays
Status: assignednew

comment:10 Changed 12 years ago by Douglas Hays

Resolution: duplicate
Status: newclosed

Dup of #4711.

comment:11 Changed 8 years ago by bill

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