Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

fix(ngOptions): fix frozen ui in ie with more than one select[multiple] #11795

Closed
wants to merge 1 commit into from

Conversation

Narretz
Copy link
Contributor

@Narretz Narretz commented May 3, 2015

If there are more than one select, and the first select is wrappend
in an element with display: inline or display: inline-block, all but
the last select are completely unresponsive to any user input.

This cannot be tested in a unit-test, as the events must come directly
from the ui.

Close #11314

This is pretty tricky, as we probably need an e2e test for this, but they currently don't run on IE. I'm also not sure if we can simply leave the label setting out.

@petebacondarwin should we wait with this until we have IE e2e tests?

@petebacondarwin
Copy link
Contributor

If you can see that this fixes the bug on IE and that we are not breaking other browsers by removing then we should merge this. I am trying to remember why both assignments are there in the first place. I have a feeling it was getting around another IE bug.

@Narretz
Copy link
Contributor Author

Narretz commented May 4, 2015

Looks like you are right:

IE 9.0.0 (Windows Vista) ngOptions should update the label property FAILED
    Expected '' to equal 'A'.
    Expected '' to equal 'B'.
    Expected '' to equal 'C'.
IE 9.0.0 (Windows Vista) ngOptions should update the label if only the property has changed FAILED
    Expected '' to equal 'A'.
    Expected '' to equal 'B'.
    Expected '' to equal 'C'.
    Expected '' to equal 'X'.

@petebacondarwin
Copy link
Contributor

So we need to find a different solution...

@petebacondarwin petebacondarwin modified the milestones: 1.4.0-rc.2, 1.4.x - jaracimrman-existence May 4, 2015
@Narretz
Copy link
Contributor Author

Narretz commented May 10, 2015

I haven't looked into a different solution, but I created an e2e test - which doesn't work. It's seems like this is essentially untestable. I have this spec to click on an option inside a select:

it('should be able to select the first select', function() {
    loadFixture("ngOptions").andWaitForAngular();
    element(by.cssContainingText('option', 'two')).click();
    expect(element(by.binding('selected1')).getText()).toBe('two');
  });

and this works! But the bug is that actual clicks from the ui don't work at all on the first select. So we can't even show the bug with an e2e test.

Narretz added a commit to Narretz/angular.js that referenced this pull request Sep 21, 2015
If there is more than one select next to each other, and the first
select is wrappend in an element with display: inline or display: inline-block,
all but the last select are completely unresponsive to any user input.

This cannot be tested in a unit-test or e2e test.

Closes angular#11314
Closes angular#11795
Narretz added a commit to Narretz/angular.js that referenced this pull request Sep 22, 2015

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
If there is more than one select next to each other, and the first
select is wrappend in an element with display: inline or display: inline-block,
all but the last select are completely unresponsive to any user input.

This cannot be tested in a unit-test or e2e test.

Closes angular#11314
Closes angular#11795
If there is more than one select next to each other, and the first
select is wrappend in an element with display: inline or display: inline-block,
all but the last select are completely unresponsive to any user input.

This cannot be tested in a unit-test or e2e test.

Closes angular#11314
Closes angular#11795
@Narretz Narretz closed this in 42c97c5 Sep 22, 2015
Narretz added a commit that referenced this pull request Sep 22, 2015
In certain scenarios, IE10/11/Edge create unresponsive select elements.
The following contribute to the bug:
- There need to be at least 2 selects next to each other
- The option elements are added via javascript
- the option.value is accessed before it is set
- the option.label is added after the option.value has been set
- The first select is wrappend in an element with display: inline or
display: inline-block,

This cannot be tested in a unit-test or e2e test.

Closes #11314
Closes #11795
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug. Select ng-options with multiple doesn't work IE10/11 when next to each other.
3 participants