mirror of
https://github.com/Choices-js/Choices.git
synced 2024-06-08 08:52:19 +02:00
Merge pull request #244 from MaksimShakavin/master
Change window.scrollY to window.pageYOffset for IE
This commit is contained in:
commit
79638ae88d
6
assets/scripts/dist/choices.js
vendored
6
assets/scripts/dist/choices.js
vendored
|
@ -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,6 +2859,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
return Choices;
|
||||
}();
|
||||
|
||||
Choices.userDefaults = {};
|
||||
|
||||
module.exports = Choices;
|
||||
|
||||
/***/ }),
|
||||
|
|
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');
|
||||
|
||||
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.
|
||||
|
|
Loading…
Reference in a new issue