-
Notifications
You must be signed in to change notification settings - Fork 3.4k
chips: editable chip gets removed after editing #11298
Comments
Unfortunately, this looks like another regression caused by the chips accessibility PR in 1.1.2. It's hard to believe that there isn't a unit test for this functionality. Thank you very much for opening this! |
Hi, Is there a workaround for this bug? Liav |
@Liave the only current work around is to use AngularJS Material 1.1.1. |
This appears to be caused by a caveat in http://api.jquery.com/children/. Notably:
It's unclear how this ever worked unless the chip contents were not stored in a I also fixed an issue where selecting and chip and then right clicking it would enter edit mode. The double click detection was very naive. I switched it to use jQuery/JQLite's I'm going to address the issue with pressing the right arrow when in edit mode in a separate issue. |
use jQuery's `contents()` instead of `children()` since the chip content elements are text nodes and `children()` doesn't find text nodes improve double click detection when editable chips are enabled add/improve JSDoc and types rename `MdChipCtrl.isEditting` to `MdChipCtrl.isEditing` Fixes #11298. Fixes #10392. Fixes #10532. Fixes #10664. Fixes #10879.
I've opened #11322 to track the arrow/mouse issues in edit mode. |
PR #11323 posted to fix chip editing. |
use jQuery's `contents()` instead of `children()` since the chip content elements are text nodes and `children()` doesn't find text nodes improve double click detection when editable chips are enabled add/improve JSDoc and types rename `MdChipCtrl.isEditting` to `MdChipCtrl.isEditing` Fixes #11298. Fixes #10392. Fixes #10532. Fixes #10664. Fixes #10879.
use jQuery's `contents()` instead of `children()` since the chip content elements are text nodes and `children()` doesn't find text nodes improve double click detection when editable chips are enabled add/improve JSDoc and types rename `MdChipCtrl.isEditting` to `MdChipCtrl.isEditing` Fixes #11298. Fixes #10392. Fixes #10532. Fixes #10664. Fixes #10879.
use jQuery's `contents()` instead of `children()` since the chip content elements are text nodes and `children()` doesn't find text nodes improve double click detection when editable chips are enabled add/improve JSDoc and types rename `MdChipCtrl.isEditting` to `MdChipCtrl.isEditing` Fixes #11298. Fixes #10392. Fixes #10532. Fixes #10664. Fixes #10879.
Bug
AngularJS Material Demo and steps to reproduce the issue:
AngularJS Material Demo which demonstrates the issue:
Detailed Reproduction Steps:
What is the expected behavior?
new value should become a chip again
What is the current behavior?
new value is removed
What is the use-case or motivation for changing an existing behavior?
This is basic functionality that should work
Which versions of AngularJS, Material, OS, and browsers are affected?
Is there anything else we should know? Stack Traces, Screenshots, etc.
There are couple of other issues
The text was updated successfully, but these errors were encountered: