Skip to content

Input element doesn't go to another line if no space left #29

Description

@twinssbc

If the tags happen to occupy the whole line (no more, no less), I think the width of the input element should be the whole itemList width, so that the input can go to another line. But the actual input element width is 0, so nothing can be inputted.

According to the method "publishInnerWidth" in Ext.ux.layout.component.field.BoxSelectField,

publishInnerWidth:function(ownerContext) {
    var me = this,
        owner = me.owner,
        width = owner.itemList.getWidth(true) - 10,
        lastEntry = owner.inputElCt.prev(null, true);

    if (lastEntry && !owner.stacked) {
        lastEntry = Ext.fly(lastEntry);
        width = width - lastEntry.getOffsetsTo(lastEntry.up(''))[0] - lastEntry.getWidth();
    }

    if (!me.skipInputGrowth && (width < 35)) {
        width = width - 10;
    } else if (width < 1) {
        width = 1;
    }
    ownerContext.inputElCtContext.setWidth(width);
}

The width will be negative, so the input element width will be 0.
Probably change it to the below lines? Thanks!

   if (!me.skipInputGrowth && (width < 35)) {
        width = {itemListWidth} - 10;
    } 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions