1
0
mirror of synced 2024-11-29 16:16:02 +03:00

Fixed opening issue

This fixes an issue where the data set would not be queried when
the dropdown was opened.
This commit is contained in:
Kevin Brown 2015-01-13 19:09:04 -05:00
parent 28f9cae5d7
commit 8d35d5e416
8 changed files with 28 additions and 28 deletions

View File

@ -4159,14 +4159,14 @@ define('select2/core',[
evt.preventDefault(); evt.preventDefault();
} else if (key === KEYS.ESC || key === KEYS.TAB) { } else if (key === KEYS.ESC || key === KEYS.TAB) {
self.trigger('close'); self.close();
evt.preventDefault(); evt.preventDefault();
} }
} else { } else {
if (key === KEYS.ENTER || key === KEYS.SPACE || if (key === KEYS.ENTER || key === KEYS.SPACE ||
((key === KEYS.DOWN || key === KEYS.UP) && evt.altKey)) { ((key === KEYS.DOWN || key === KEYS.UP) && evt.altKey)) {
self.trigger('open'); self.open();
evt.preventDefault(); evt.preventDefault();
} }
@ -4179,7 +4179,7 @@ define('select2/core',[
if (this.options.get('disabled')) { if (this.options.get('disabled')) {
if (this.isOpen()) { if (this.isOpen()) {
this.trigger('close'); this.close();
} }
this.trigger('disable'); this.trigger('disable');
@ -4227,9 +4227,9 @@ define('select2/core',[
} }
if (this.isOpen()) { if (this.isOpen()) {
this.trigger('close'); this.close();
} else { } else {
this.trigger('open'); this.open();
} }
}; };

View File

@ -4159,14 +4159,14 @@ define('select2/core',[
evt.preventDefault(); evt.preventDefault();
} else if (key === KEYS.ESC || key === KEYS.TAB) { } else if (key === KEYS.ESC || key === KEYS.TAB) {
self.trigger('close'); self.close();
evt.preventDefault(); evt.preventDefault();
} }
} else { } else {
if (key === KEYS.ENTER || key === KEYS.SPACE || if (key === KEYS.ENTER || key === KEYS.SPACE ||
((key === KEYS.DOWN || key === KEYS.UP) && evt.altKey)) { ((key === KEYS.DOWN || key === KEYS.UP) && evt.altKey)) {
self.trigger('open'); self.open();
evt.preventDefault(); evt.preventDefault();
} }
@ -4179,7 +4179,7 @@ define('select2/core',[
if (this.options.get('disabled')) { if (this.options.get('disabled')) {
if (this.isOpen()) { if (this.isOpen()) {
this.trigger('close'); this.close();
} }
this.trigger('disable'); this.trigger('disable');
@ -4227,9 +4227,9 @@ define('select2/core',[
} }
if (this.isOpen()) { if (this.isOpen()) {
this.trigger('close'); this.close();
} else { } else {
this.trigger('open'); this.open();
} }
}; };

View File

@ -13694,14 +13694,14 @@ define('select2/core',[
evt.preventDefault(); evt.preventDefault();
} else if (key === KEYS.ESC || key === KEYS.TAB) { } else if (key === KEYS.ESC || key === KEYS.TAB) {
self.trigger('close'); self.close();
evt.preventDefault(); evt.preventDefault();
} }
} else { } else {
if (key === KEYS.ENTER || key === KEYS.SPACE || if (key === KEYS.ENTER || key === KEYS.SPACE ||
((key === KEYS.DOWN || key === KEYS.UP) && evt.altKey)) { ((key === KEYS.DOWN || key === KEYS.UP) && evt.altKey)) {
self.trigger('open'); self.open();
evt.preventDefault(); evt.preventDefault();
} }
@ -13714,7 +13714,7 @@ define('select2/core',[
if (this.options.get('disabled')) { if (this.options.get('disabled')) {
if (this.isOpen()) { if (this.isOpen()) {
this.trigger('close'); this.close();
} }
this.trigger('disable'); this.trigger('disable');
@ -13762,9 +13762,9 @@ define('select2/core',[
} }
if (this.isOpen()) { if (this.isOpen()) {
this.trigger('close'); this.close();
} else { } else {
this.trigger('open'); this.open();
} }
}; };

File diff suppressed because one or more lines are too long

10
dist/js/select2.js vendored
View File

@ -4587,14 +4587,14 @@ define('select2/core',[
evt.preventDefault(); evt.preventDefault();
} else if (key === KEYS.ESC || key === KEYS.TAB) { } else if (key === KEYS.ESC || key === KEYS.TAB) {
self.trigger('close'); self.close();
evt.preventDefault(); evt.preventDefault();
} }
} else { } else {
if (key === KEYS.ENTER || key === KEYS.SPACE || if (key === KEYS.ENTER || key === KEYS.SPACE ||
((key === KEYS.DOWN || key === KEYS.UP) && evt.altKey)) { ((key === KEYS.DOWN || key === KEYS.UP) && evt.altKey)) {
self.trigger('open'); self.open();
evt.preventDefault(); evt.preventDefault();
} }
@ -4607,7 +4607,7 @@ define('select2/core',[
if (this.options.get('disabled')) { if (this.options.get('disabled')) {
if (this.isOpen()) { if (this.isOpen()) {
this.trigger('close'); this.close();
} }
this.trigger('disable'); this.trigger('disable');
@ -4655,9 +4655,9 @@ define('select2/core',[
} }
if (this.isOpen()) { if (this.isOpen()) {
this.trigger('close'); this.close();
} else { } else {
this.trigger('open'); this.open();
} }
}; };

File diff suppressed because one or more lines are too long

View File

@ -292,14 +292,14 @@ define([
evt.preventDefault(); evt.preventDefault();
} else if (key === KEYS.ESC || key === KEYS.TAB) { } else if (key === KEYS.ESC || key === KEYS.TAB) {
self.trigger('close'); self.close();
evt.preventDefault(); evt.preventDefault();
} }
} else { } else {
if (key === KEYS.ENTER || key === KEYS.SPACE || if (key === KEYS.ENTER || key === KEYS.SPACE ||
((key === KEYS.DOWN || key === KEYS.UP) && evt.altKey)) { ((key === KEYS.DOWN || key === KEYS.UP) && evt.altKey)) {
self.trigger('open'); self.open();
evt.preventDefault(); evt.preventDefault();
} }
@ -312,7 +312,7 @@ define([
if (this.options.get('disabled')) { if (this.options.get('disabled')) {
if (this.isOpen()) { if (this.isOpen()) {
this.trigger('close'); this.close();
} }
this.trigger('disable'); this.trigger('disable');
@ -360,9 +360,9 @@ define([
} }
if (this.isOpen()) { if (this.isOpen()) {
this.trigger('close'); this.close();
} else { } else {
this.trigger('open'); this.open();
} }
}; };