Skip to content

Commit 18fe22b

Browse files
committed
Don't allow caret between items when full.
1 parent 23739be commit 18fe22b

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

jquery.selectize.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1559,7 +1559,7 @@
15591559
* @param {boolean} focus
15601560
*/
15611561
Selectize.prototype.setCaret = function(i, focus) {
1562-
if (this.settings.mode === 'single') {
1562+
if (this.settings.mode === 'single' || this.isFull()) {
15631563
i = this.items.length;
15641564
} else {
15651565
i = Math.max(0, Math.min(this.items.length, i));

jquery.selectize.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/selectize.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1192,7 +1192,7 @@ Selectize.prototype.advanceCaret = function(direction, e) {
11921192
* @param {boolean} focus
11931193
*/
11941194
Selectize.prototype.setCaret = function(i, focus) {
1195-
if (this.settings.mode === 'single') {
1195+
if (this.settings.mode === 'single' || this.isFull()) {
11961196
i = this.items.length;
11971197
} else {
11981198
i = Math.max(0, Math.min(this.items.length, i));

0 commit comments

Comments
 (0)