Skip to content

Commit 8722ae2

Browse files
committed
Compile dist
1 parent 66ae2ad commit 8722ae2

5 files changed

Lines changed: 84 additions & 44 deletions

File tree

dist/js/i18n/nl.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/js/select2.full.js

Lines changed: 39 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1870,27 +1870,49 @@ S2.define('select2/selection/search',[
18701870
// Workaround for browsers which do not support the `input` event
18711871
// This will prevent double-triggering of events for browsers which support
18721872
// both the `keyup` and `input` events.
1873-
this.$selection.on('input', '.select2-search--inline', function (evt) {
1874-
// Unbind the duplicated `keyup` event
1875-
self.$selection.off('keyup.search');
1876-
});
1877-
1878-
this.$selection.on('keyup.search input', '.select2-search--inline',
1879-
function (evt) {
1880-
var key = evt.which;
1873+
this.$selection.on(
1874+
'input.searchcheck',
1875+
'.select2-search--inline',
1876+
function (evt) {
1877+
// Try to detect the IE version should the `documentMode` property that
1878+
// is stored on the document. This is only implemented in IE and is
1879+
// slightly cleaner than doing a user agent check.
1880+
// This property is not available in Edge, but Edge also doesn't have
1881+
// this bug.
1882+
var msie = document.documentMode;
1883+
1884+
// IE will trigger the `input` event when a placeholder is used on a
1885+
// search box. To get around this issue, we are forced to ignore all
1886+
// `input` events in IE and keep using `keyup`.
1887+
if (msie && msie <= 11) {
1888+
self.$selection.off('input.search input.searchcheck');
1889+
return;
1890+
}
18811891

1882-
// We can freely ignore events from modifier keys
1883-
if (key == KEYS.SHIFT || key == KEYS.CTRL || key == KEYS.ALT) {
1884-
return;
1892+
// Unbind the duplicated `keyup` event
1893+
self.$selection.off('keyup.search');
18851894
}
1895+
);
18861896

1887-
// Tabbing will be handled during the `keydown` phase
1888-
if (key == KEYS.TAB) {
1889-
return;
1890-
}
1897+
this.$selection.on(
1898+
'keyup.search input.search',
1899+
'.select2-search--inline',
1900+
function (evt) {
1901+
var key = evt.which;
18911902

1892-
self.handleSearch(evt);
1893-
});
1903+
// We can freely ignore events from modifier keys
1904+
if (key == KEYS.SHIFT || key == KEYS.CTRL || key == KEYS.ALT) {
1905+
return;
1906+
}
1907+
1908+
// Tabbing will be handled during the `keydown` phase
1909+
if (key == KEYS.TAB) {
1910+
return;
1911+
}
1912+
1913+
self.handleSearch(evt);
1914+
}
1915+
);
18941916
};
18951917

18961918
/**
@@ -5249,8 +5271,6 @@ S2.define('select2/core',[
52495271
}
52505272

52515273
this.trigger('query', {});
5252-
5253-
this.trigger('open');
52545274
};
52555275

52565276
Select2.prototype.close = function () {

dist/js/select2.full.min.js

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

dist/js/select2.js

Lines changed: 39 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1870,27 +1870,49 @@ S2.define('select2/selection/search',[
18701870
// Workaround for browsers which do not support the `input` event
18711871
// This will prevent double-triggering of events for browsers which support
18721872
// both the `keyup` and `input` events.
1873-
this.$selection.on('input', '.select2-search--inline', function (evt) {
1874-
// Unbind the duplicated `keyup` event
1875-
self.$selection.off('keyup.search');
1876-
});
1877-
1878-
this.$selection.on('keyup.search input', '.select2-search--inline',
1879-
function (evt) {
1880-
var key = evt.which;
1873+
this.$selection.on(
1874+
'input.searchcheck',
1875+
'.select2-search--inline',
1876+
function (evt) {
1877+
// Try to detect the IE version should the `documentMode` property that
1878+
// is stored on the document. This is only implemented in IE and is
1879+
// slightly cleaner than doing a user agent check.
1880+
// This property is not available in Edge, but Edge also doesn't have
1881+
// this bug.
1882+
var msie = document.documentMode;
1883+
1884+
// IE will trigger the `input` event when a placeholder is used on a
1885+
// search box. To get around this issue, we are forced to ignore all
1886+
// `input` events in IE and keep using `keyup`.
1887+
if (msie && msie <= 11) {
1888+
self.$selection.off('input.search input.searchcheck');
1889+
return;
1890+
}
18811891

1882-
// We can freely ignore events from modifier keys
1883-
if (key == KEYS.SHIFT || key == KEYS.CTRL || key == KEYS.ALT) {
1884-
return;
1892+
// Unbind the duplicated `keyup` event
1893+
self.$selection.off('keyup.search');
18851894
}
1895+
);
18861896

1887-
// Tabbing will be handled during the `keydown` phase
1888-
if (key == KEYS.TAB) {
1889-
return;
1890-
}
1897+
this.$selection.on(
1898+
'keyup.search input.search',
1899+
'.select2-search--inline',
1900+
function (evt) {
1901+
var key = evt.which;
18911902

1892-
self.handleSearch(evt);
1893-
});
1903+
// We can freely ignore events from modifier keys
1904+
if (key == KEYS.SHIFT || key == KEYS.CTRL || key == KEYS.ALT) {
1905+
return;
1906+
}
1907+
1908+
// Tabbing will be handled during the `keydown` phase
1909+
if (key == KEYS.TAB) {
1910+
return;
1911+
}
1912+
1913+
self.handleSearch(evt);
1914+
}
1915+
);
18941916
};
18951917

18961918
/**
@@ -5249,8 +5271,6 @@ S2.define('select2/core',[
52495271
}
52505272

52515273
this.trigger('query', {});
5252-
5253-
this.trigger('open');
52545274
};
52555275

52565276
Select2.prototype.close = function () {

dist/js/select2.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.

0 commit comments

Comments
 (0)