sweetalert2 11.26.21 → 11.26.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/sweetalert2.all.js +54 -92
- package/dist/sweetalert2.all.min.js +3 -3
- package/dist/sweetalert2.css +2 -2
- package/dist/sweetalert2.esm.all.js +54 -92
- package/dist/sweetalert2.esm.all.min.js +3 -3
- package/dist/sweetalert2.esm.js +53 -91
- package/dist/sweetalert2.esm.min.js +2 -2
- package/dist/sweetalert2.js +53 -91
- package/dist/sweetalert2.min.css +1 -1
- package/dist/sweetalert2.min.js +2 -2
- package/package.json +6 -17
- package/src/SweetAlert.js +2 -1
- package/src/keydown-handler.js +3 -1
- package/src/sweetalert2.scss +2 -2
- package/src/types.js +2 -0
- package/src/utils/dom/domUtils.js +10 -18
- package/src/utils/dom/inputUtils.js +8 -23
- package/src/utils/dom/renderers/renderActions.js +13 -15
- package/src/utils/dom/renderers/renderInput.js +2 -0
- package/src/utils/draggable.js +4 -10
- package/src/utils/getTemplateParams.js +15 -22
- package/src/utils/iosFix.js +3 -0
- package/src/utils/openPopup.js +7 -2
- package/sweetalert2.d.ts +1 -1
package/src/utils/openPopup.js
CHANGED
|
@@ -2,7 +2,7 @@ import globalState from '../globalState.js'
|
|
|
2
2
|
import { setAriaHidden } from './aria.js'
|
|
3
3
|
import { swalClasses } from './classes.js'
|
|
4
4
|
import * as dom from './dom/index.js'
|
|
5
|
-
import { iOSfix } from './iosFix.js'
|
|
5
|
+
import { iOSfix, isIOS } from './iosFix.js'
|
|
6
6
|
import { replaceScrollbarWithPadding } from './scrollbar.js'
|
|
7
7
|
|
|
8
8
|
export const SHOW_CLASS_TIMEOUT = 10
|
|
@@ -35,7 +35,6 @@ export const openPopup = (params) => {
|
|
|
35
35
|
}, SHOW_CLASS_TIMEOUT)
|
|
36
36
|
|
|
37
37
|
if (dom.isModal()) {
|
|
38
|
-
// Using ternary instead of ?? operator for Webpack 4 compatibility
|
|
39
38
|
fixScrollContainer(
|
|
40
39
|
container,
|
|
41
40
|
params.scrollbarPadding !== undefined ? params.scrollbarPadding : false,
|
|
@@ -44,6 +43,12 @@ export const openPopup = (params) => {
|
|
|
44
43
|
setAriaHidden()
|
|
45
44
|
}
|
|
46
45
|
|
|
46
|
+
// https://github.com/sweetalert2/sweetalert2/issues/2923
|
|
47
|
+
if (isIOS && params.backdrop === false && popup.scrollHeight > container.clientHeight) {
|
|
48
|
+
// remove pointer-events: none from container, it breaks scrolling tall popups in iOS
|
|
49
|
+
container.style.pointerEvents = 'auto'
|
|
50
|
+
}
|
|
51
|
+
|
|
47
52
|
if (!dom.isToast() && !globalState.previousActiveElement) {
|
|
48
53
|
globalState.previousActiveElement = document.activeElement
|
|
49
54
|
}
|
package/sweetalert2.d.ts
CHANGED