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.
@@ -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
@@ -1312,4 +1312,4 @@ declare module 'sweetalert2/*/sweetalert2.all.js' {
1312
1312
  * They will be merged with 'true' definitions.
1313
1313
  */
1314
1314
 
1315
- interface JQuery {} // eslint-disable-line @typescript-eslint/no-empty-object-type
1315
+ interface JQuery {}