@portal-hq/webview 4.1.3 → 4.1.5
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/lib/commonjs/index.js +2 -2
- package/lib/commonjs/loading/index.js +0 -1
- package/lib/esm/index.js +2 -2
- package/lib/esm/loading/index.js +0 -1
- package/package.json +5 -5
- package/src/index.tsx +5 -5
- package/src/loading/index.tsx +0 -1
package/lib/commonjs/index.js
CHANGED
|
@@ -144,9 +144,9 @@ const Webview = (0, react_1.memo)((0, react_1.forwardRef)(({ onNavigationStateCh
|
|
|
144
144
|
}, []);
|
|
145
145
|
// Handle Android stuff
|
|
146
146
|
(0, react_1.useEffect)(() => {
|
|
147
|
-
react_native_1.BackHandler.addEventListener('hardwareBackPress', handleBackPress);
|
|
147
|
+
const subscription = react_native_1.BackHandler.addEventListener('hardwareBackPress', handleBackPress);
|
|
148
148
|
return () => {
|
|
149
|
-
|
|
149
|
+
subscription.remove();
|
|
150
150
|
};
|
|
151
151
|
}, []);
|
|
152
152
|
// Ensure that the webView ref gets forwarded to the parent component
|
package/lib/esm/index.js
CHANGED
|
@@ -116,9 +116,9 @@ const Webview = memo(forwardRef(({ onNavigationStateChange, onSigningRequested,
|
|
|
116
116
|
}, []);
|
|
117
117
|
// Handle Android stuff
|
|
118
118
|
useEffect(() => {
|
|
119
|
-
BackHandler.addEventListener('hardwareBackPress', handleBackPress);
|
|
119
|
+
const subscription = BackHandler.addEventListener('hardwareBackPress', handleBackPress);
|
|
120
120
|
return () => {
|
|
121
|
-
|
|
121
|
+
subscription.remove();
|
|
122
122
|
};
|
|
123
123
|
}, []);
|
|
124
124
|
// Ensure that the webView ref gets forwarded to the parent component
|
package/lib/esm/loading/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@portal-hq/webview",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.5",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/esm/index",
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
"test": "jest --passWithNoTests"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@portal-hq/core": "^4.1.
|
|
22
|
-
"@portal-hq/injected-provider": "^4.1.
|
|
23
|
-
"@portal-hq/utils": "^4.1.
|
|
21
|
+
"@portal-hq/core": "^4.1.5",
|
|
22
|
+
"@portal-hq/injected-provider": "^4.1.5",
|
|
23
|
+
"@portal-hq/utils": "^4.1.5"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@types/jest": "^29.2.0",
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"react-native": "*",
|
|
37
37
|
"react-native-webview": "*"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "5ba19390f12935fc74b6235a4b2655a1e1c7a07f"
|
|
40
40
|
}
|
package/src/index.tsx
CHANGED
|
@@ -164,13 +164,13 @@ const Webview = memo(
|
|
|
164
164
|
|
|
165
165
|
// Handle Android stuff
|
|
166
166
|
useEffect(() => {
|
|
167
|
-
BackHandler.addEventListener(
|
|
167
|
+
const subscription = BackHandler.addEventListener(
|
|
168
|
+
'hardwareBackPress',
|
|
169
|
+
handleBackPress,
|
|
170
|
+
)
|
|
168
171
|
|
|
169
172
|
return () => {
|
|
170
|
-
|
|
171
|
-
'hardwareBackPress',
|
|
172
|
-
handleBackPress,
|
|
173
|
-
)
|
|
173
|
+
subscription.remove()
|
|
174
174
|
}
|
|
175
175
|
}, [])
|
|
176
176
|
|