Skip to content
This repository has been archived by the owner on Oct 2, 2019. It is now read-only.

Placeholder in multiselect showing a single charater on page load #845

Open
arj-ary opened this issue Apr 13, 2015 · 10 comments
Open

Placeholder in multiselect showing a single charater on page load #845

arj-ary opened this issue Apr 13, 2015 · 10 comments

Comments

@arj-ary
Copy link

arj-ary commented Apr 13, 2015

Hello,

I have an issue with the placeholder for mutiselect, the placeholder apparently displays just a single character on pageload. When i go ahead and click somewhere in the page the select displays the complete placeholder text. Is this a know bug? please advise.
ui-select-bug

@bramcordie
Copy link

I'm experiencing this issue as well. The same problem occurred in the past and was fixed before: #230. When I make sure the element is visible from the start the placeholder does not get cut off. I'm guessing they broke the original solution? @jox Is it still working for you?

@bramcordie
Copy link

The code relevant to the previous fix has been moved. The width at which the characters are getting cut off matches the with this line: https://github.com/angular-ui/ui-select/blob/master/src/uiSelectController.js#L353. I'm guessing the watcher isn't firing like it should, will look into it further.

@unrealsolver
Copy link

I have this issue too. @bramcordie, I have exactly that width (10px) at the first show up. Width recalculates if after next hide-show.

@bramcordie
Copy link

I ended up swapping the wrapping element's ng-show with an ng-if as a work around.

I also noticed the width of the input element does not adjust when the container changes dimensions. When you make the container smaller the input will keep its size and it gets pushed to a new line. It's not just a visual artefact, some areas of the ui-select become un-clickable this way. Would it help to add some screens or a fiddle or is this a known issue?

@unrealsolver
Copy link

I've noticed that issue as well. Looks like it's related to original problem. We need more reliable resizing.
Sort of feature: https://github.com/angular-ui/ui-select/blob/master/src/uiSelectController.js#L340

@abingham
Copy link

FWIW I'm seeing this as well for selects that are on tab panes which are initially inactive. When the containing pane becomes active, the placeholder is incorrectly sized. If I make that pane initially active, the size seems to be correct.

@morgdenn
Copy link

Thanks @bramcordie, replacing ng-show with ng-if fixed it for me.

@roland-ewald
Copy link

The CSS-workaround suggested by @jox for #230 still works: #230 (comment)

@cleon26
Copy link

cleon26 commented Sep 24, 2015

I'm using version 0.12.1 and am seeing this problem still. In my scenario, the control is on a tab that's initially hidden so the width isn't correctly calculated. I can't go around hacking ng-if's into my code everywhere to fix this (although it did work when I tested it).

@colinbes
Copy link

I am seeing this with ui-select 0.13.2 as well.

I am not sure if identical because after roughly 10seconds the select input box updates and shows correctly.

Note that data is definitely loaded and issue is not zero length data - I have also wrapped with ng-if to ensure not loaded without data being ready.

kavika-1 referenced this issue May 20, 2016
- Optimize running dynamic width calculations when resizing
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

9 participants