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

Tag select input field does not grow correctly in IE #2427

Closed
klaascuvelier opened this issue Nov 9, 2018 · 1 comment · Fixed by #4262
Closed

Tag select input field does not grow correctly in IE #2427

klaascuvelier opened this issue Nov 9, 2018 · 1 comment · Fixed by #4262

Comments

@klaascuvelier
Copy link

Version

1.8.0

Environment

all

Reproduction link

https://ng-zorro-antd-start-vsrhwy.stackblitz.io

Steps to reproduce

In IE start typing in the input field of the select component (in tag mode)

What is expected?

The input field has the correct width

What is actually happening?

Input field does not grow correctly

Other?

I assume this is the related code:

this.renderer.setStyle(this.inputElement.nativeElement, 'width', `${this.inputElement.nativeElement.scrollWidth}px`);

Seems not to work correctly in IE, In Safari on MacOS it's also not perfect, but it's not as bad

@brampeirs
Copy link

brampeirs commented Apr 9, 2019

scrollwidth stays the same in IE11, it is not correctly calculated.
This could be fixed with this polyfill: https://github.com/gregwhitworth/scrollWidthPolyfill

FYI: scrollwidth bug was fixed in Edge, but not in IE11: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/11689089/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants