Change window.scrollY to window.pageYOffset for IE

This commit is contained in:
c5254061 2017-09-05 17:17:51 +03:00
parent f29307ec47
commit 671a696962
4 changed files with 9 additions and 7 deletions

View file

@ -196,7 +196,7 @@ return /******/ (function(modules) { // webpackBootstrap
};
// 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.silent) {
@ -882,7 +882,7 @@ return /******/ (function(modules) { // webpackBootstrap
this.dropdown.setAttribute('aria-expanded', 'true');
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
// greater than the window height flip the dropdown.
@ -2859,7 +2859,9 @@ return /******/ (function(modules) { // webpackBootstrap
return Choices;
}();
module.exports = Choices;
Choices.userDefaults = {};
module.exports = Choices;
/***/ }),
/* 2 */

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -759,7 +759,7 @@ class Choices {
this.dropdown.setAttribute('aria-expanded', 'true');
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
// greater than the window height flip the dropdown.