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

Chips: Add missing mouse interactions #623

Merged

Conversation

pauln
Copy link
Contributor

@pauln pauln commented Jan 12, 2017

Add the ability to click anywhere in the chips element to give the input focus, plus the ability to click on a chip to focus it. This makes the chips element behave more like its Angular Material counterpart, which supports these interactions.

@wmadden
Copy link
Contributor

wmadden commented Apr 21, 2017

@miguelcobain / maintainers is there any progress here? paper-chips's behaviour is at the moment pretty unusable

@pauln
Copy link
Contributor Author

pauln commented May 29, 2017

@miguelcobain I've just rebased this onto current master, as there was a conflict. The Travis checks appear to be failing due to an issue with node-sass :
ENOENT: no such file or directory, scandir '/home/travis/build/miguelcobain/ember-paper/node_modules/node-sass/vendor'

I see that's fixed in PR #709, so this build should pass once that's been merged.

@pauln
Copy link
Contributor Author

pauln commented May 30, 2017

@miguelcobain I've rebased this again now that the fix for the node-sass CI issue is on master, and the Travis checks are passing again. #615 and #632 are still showing no conflicts, so all should now be good to go again, when you get a chance.

Add the ability to click anywhere in the chips element to give the input focus, plus the ability to click on a chip to focus it.
@pauln
Copy link
Contributor Author

pauln commented Jul 26, 2017

  • Rebased again
  • Fixed issues with focus being left behind on autocomplete and contact chips elements
  • Fixed incomplete mouse interactions on contact chips

@miguelcobain
Copy link
Collaborator

@pauln thanks your fixes look great.
There are two more things left that I could identify, though.

  1. when readOnly is true, we shouldn't be focusing chips.
  2. when readOnlyis true, we should add the md-readonly class on the <md-chips-wrap> element.
  3. <md-chips> incorrectly has the class md-chips. <md-chips-wrap> should have that class instead.

Last two problems make the style cursor: text enabled, even when the control is readOnly. This leads to a confusing situation where you seem to be able to click the control, but you aren't.

Also removes the md-chips class from the md-chips element.  This fixes the issue where `cursor: text` was being applied even when read-only.
@pauln
Copy link
Contributor Author

pauln commented Jul 26, 2017

Oops - well spotted, @miguelcobain. Those issues should now be resolved.

@miguelcobain miguelcobain merged commit 39fa3a8 into adopted-ember-addons:master Jul 27, 2017
@miguelcobain
Copy link
Collaborator

@pauln 🥇

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

Successfully merging this pull request may close these issues.

3 participants