Skip to content

Commit

Permalink
Merge pull request #80 from philfung/fixpopupcannotreopen
Browse files Browse the repository at this point in the history
Fixpopupcannotreopen
  • Loading branch information
philfung authored Feb 7, 2025
2 parents cacdd17 + 8f7151a commit 34fffa2
Show file tree
Hide file tree
Showing 27 changed files with 36 additions and 24 deletions.
5 changes: 5 additions & 0 deletions dist/add-to-homescreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,9 @@ function AddToHomeScreen(options) {
window.removeEventListener("touchstart", closeEventListener);
window.removeEventListener("click", closeEventListener);
closeEventListener = null;
if (_desktopInstallPromptWasShown) {
_desktopInstallPromptWasShown = false;
}
}
},
// If the dialog is hidden in 300ms in Safari, the browser reports a second
Expand Down Expand Up @@ -779,6 +782,8 @@ function AddToHomeScreen(options) {
show,
closeModal,
modalIsShowing,
isDeviceIOS,
isDeviceAndroid,
isBrowserAndroidChrome,
isBrowserAndroidFacebook,
isBrowserAndroidFirefox,
Expand Down
2 changes: 1 addition & 1 deletion dist/add-to-homescreen.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/add-to-homescreen_ar.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/add-to-homescreen_cs.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/add-to-homescreen_da.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/add-to-homescreen_de.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/add-to-homescreen_en.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/add-to-homescreen_es.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/add-to-homescreen_fr.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/add-to-homescreen_he.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/add-to-homescreen_it.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/add-to-homescreen_ja.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/add-to-homescreen_ko.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/add-to-homescreen_lv.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/add-to-homescreen_pl.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/add-to-homescreen_pt.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/add-to-homescreen_ru.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/add-to-homescreen_sl.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/add-to-homescreen_sv.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/add-to-homescreen_th.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/add-to-homescreen_vn.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/add-to-homescreen_zh.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/add-to-homescreen_zh_CN.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/add-to-homescreen_zh_HK.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/add-to-homescreen_zh_TW.min.js

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,9 @@ export function AddToHomeScreen(
window.removeEventListener("touchstart", closeEventListener);
window.removeEventListener("click", closeEventListener);
closeEventListener = null;
if (_desktopInstallPromptWasShown) {
_desktopInstallPromptWasShown = false;
}
}
},
// If the dialog is hidden in 300ms in Safari, the browser reports a second
Expand Down Expand Up @@ -1102,6 +1105,8 @@ export function AddToHomeScreen(
show,
closeModal,
modalIsShowing,
isDeviceIOS,
isDeviceAndroid,
isBrowserAndroidChrome,
isBrowserAndroidFacebook,
isBrowserAndroidFirefox,
Expand Down
2 changes: 2 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ export interface AddToHomeScreenType {
show: (locale: string) => DeviceInfo;
closeModal: () => void;
modalIsShowing: () => boolean;
isDeviceIOS: () => boolean;
isDeviceAndroid: () => boolean;
isBrowserIOSSafari: () => boolean;
isBrowserIOSChrome: () => boolean;
isBrowserIOSFirefox: () => boolean;
Expand Down

0 comments on commit 34fffa2

Please sign in to comment.