1
0
mirror of synced 2024-11-23 05:26:10 +03:00
Commit Graph

5 Commits

Author SHA1 Message Date
Krzysztof Śmiałek
04d3a5da66 Add dedicated event for clearing
Closes #4929, #5045.
2017-10-26 00:30:31 -04:00
Krzysztof Śmiałek
10bda78b37 Fix value not being cleared when unselect event is emitted
Fixes #5049.
2017-10-26 00:30:24 -04:00
Kevin Brown
a74547aaa7 Migrate from expect to assert.expect
After we upgraded to QUnit 1.23.1, we gained support for
assert.expect(). This allows us to guard against any race conditions
within tests, because now expect() will be linked to the specific test
instead of the current running test.
2016-05-23 23:38:45 -04:00
Kevin Brown
72e5c2a50d Combine tests into common files
This groups tests into common HTML files so they can be run more
quickly. This also reduces the number of Sauce Labs instances that
have to be run, as one instance was previously spun up for each
file.
2015-02-13 23:29:56 -05:00
Kevin Brown
d81886e5de Trigger the unselect event when clearing placeholder
In the past, Select2 triggered the `select2-clearing` event when
clearing the placeholder. This has been switched to the `unselect`
event which is now triggered whenever the placeholder is cleared.
The placeholder can also be prevented if the `unselecting` event
is prevented.

This will also trigger the event when deleting every option from
the multiple select, so it is possible for the `unselecting` event
to be triggered multiple times when clearing a multiple select.

This adds tests to ensure that the `allowClear` option always works.

This closes https://github.com/select2/select2/issues/2954.
2015-01-21 19:11:07 -05:00