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

Conversation

topherfangio
Copy link
Contributor

If an autocomplete's item had spaces at the end, it would cause the autocomplete to show only the selected option when attempting to clear the value.

This was caused because the oninput event that we fire was somehow resetting the value in the scope (after we had cleared it). Fix by resetting the scope back to an empty value after we fire the oninput event.

Additionally, fix a few issues in the Virtual Repeat that was affecting the autocomplete and some test descriptions:

Fixes #7655. Fixes #8178.

If an autocomplete's item had spaces at the end, it would cause the
autocomplete to show only the selected option when attempting to
clear the value.

This was caused because the `oninput` event that we fire was somehow
resetting the value in the scope (after we had cleared it). Fix by
resetting the scope back to an empty value after we fire the `oninput`
event.

Additionally, fix a few issues in the Virtual Repeat that was affecting
the autocomplete and some test descriptions:

- Add unwatcher in Virtual Repeat to fix angular#8178.
- Use cached values in `$mdUtil.waitTransitionEnd()` to speed up performance
  and fix sizing issue in Virtual Repeat affecting the autocomplete.
- Fix a few descriptions in the tests to be shorter/clearer and fix typos.

Fixes angular#7655. Fixes angular#8178.
@topherfangio topherfangio added the needs: review This PR is waiting on review from the team label May 28, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs: review This PR is waiting on review from the team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mdVirtualRepeat/mdAutocomplete - browser window resizing causes watchers leak Space at the end of item causes incorrect dropdown result
2 participants