Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
twinssbc opened this issue Apr 15, 2013 · 0 comments
Open

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

twinssbc opened this issue Apr 15, 2013 · 0 comments

Comments

@twinssbc
Copy link

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;
    } 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant