mirror of
https://github.com/Choices-js/Choices.git
synced 2024-06-29 10:50:03 +02:00
Change window.scrollY to window.pageYOffset for IE
This commit is contained in:
parent
f29307ec47
commit
671a696962
8
assets/scripts/dist/choices.js
vendored
8
assets/scripts/dist/choices.js
vendored
|
@ -196,7 +196,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||||
};
|
};
|
||||||
|
|
||||||
// Merge options with user options
|
// Merge options with user options
|
||||||
this.config = (0, _utils.extend)(defaultConfig, userConfig);
|
this.config = (0, _utils.extend)(defaultConfig, Choices.userDefaults, userConfig);
|
||||||
|
|
||||||
if (this.config.renderSelectedChoices !== 'auto' && this.config.renderSelectedChoices !== 'always') {
|
if (this.config.renderSelectedChoices !== 'auto' && this.config.renderSelectedChoices !== 'always') {
|
||||||
if (!this.config.silent) {
|
if (!this.config.silent) {
|
||||||
|
@ -882,7 +882,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||||
this.dropdown.setAttribute('aria-expanded', 'true');
|
this.dropdown.setAttribute('aria-expanded', 'true');
|
||||||
|
|
||||||
var dimensions = this.dropdown.getBoundingClientRect();
|
var dimensions = this.dropdown.getBoundingClientRect();
|
||||||
var dropdownPos = Math.ceil(dimensions.top + window.scrollY + this.dropdown.offsetHeight);
|
var dropdownPos = Math.ceil(dimensions.top + window.pageYOffset + this.dropdown.offsetHeight);
|
||||||
|
|
||||||
// If flip is enabled and the dropdown bottom position is
|
// If flip is enabled and the dropdown bottom position is
|
||||||
// greater than the window height flip the dropdown.
|
// greater than the window height flip the dropdown.
|
||||||
|
@ -2859,7 +2859,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||||
return Choices;
|
return Choices;
|
||||||
}();
|
}();
|
||||||
|
|
||||||
module.exports = Choices;
|
Choices.userDefaults = {};
|
||||||
|
|
||||||
|
module.exports = Choices;
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
/* 2 */
|
/* 2 */
|
||||||
|
|
2
assets/scripts/dist/choices.js.map
vendored
2
assets/scripts/dist/choices.js.map
vendored
File diff suppressed because one or more lines are too long
4
assets/scripts/dist/choices.min.js
vendored
4
assets/scripts/dist/choices.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -759,7 +759,7 @@ class Choices {
|
||||||
this.dropdown.setAttribute('aria-expanded', 'true');
|
this.dropdown.setAttribute('aria-expanded', 'true');
|
||||||
|
|
||||||
const dimensions = this.dropdown.getBoundingClientRect();
|
const dimensions = this.dropdown.getBoundingClientRect();
|
||||||
const dropdownPos = Math.ceil(dimensions.top + window.scrollY + this.dropdown.offsetHeight);
|
const dropdownPos = Math.ceil(dimensions.top + window.pageYOffset + this.dropdown.offsetHeight);
|
||||||
|
|
||||||
// If flip is enabled and the dropdown bottom position is
|
// If flip is enabled and the dropdown bottom position is
|
||||||
// greater than the window height flip the dropdown.
|
// greater than the window height flip the dropdown.
|
||||||
|
|
Loading…
Reference in a new issue