@glomopay/react-native-sdk 1.3.3 → 1.3.4
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webview-flow.injection.d.ts","sourceRoot":"","sources":["../../src/injections/webview-flow.injection.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,eAAO,MAAM,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"webview-flow.injection.d.ts","sourceRoot":"","sources":["../../src/injections/webview-flow.injection.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,eAAO,MAAM,cAAc,EAAE,MA8K5B,CAAC"}
|
|
@@ -113,6 +113,16 @@ exports.injectedScript = `
|
|
|
113
113
|
return originalSend.apply(this, arguments);
|
|
114
114
|
};
|
|
115
115
|
|
|
116
|
+
// Intercepting programmatic form.submit() — force target="_blank" to "_self"
|
|
117
|
+
// This prevents forms from trying to open new windows (which fail silently in WebView)
|
|
118
|
+
const originalSubmit = HTMLFormElement.prototype.submit;
|
|
119
|
+
HTMLFormElement.prototype.submit = function() {
|
|
120
|
+
if (this.target === '_blank') {
|
|
121
|
+
this.target = '_self';
|
|
122
|
+
}
|
|
123
|
+
return originalSubmit.call(this);
|
|
124
|
+
};
|
|
125
|
+
|
|
116
126
|
// Intercepting window.open
|
|
117
127
|
const originalWindowOpen = window.open;
|
|
118
128
|
window.open = function(url, target, features) {
|
package/package.json
CHANGED
|
@@ -110,6 +110,16 @@ export const injectedScript: string = `
|
|
|
110
110
|
return originalSend.apply(this, arguments);
|
|
111
111
|
};
|
|
112
112
|
|
|
113
|
+
// Intercepting programmatic form.submit() — force target="_blank" to "_self"
|
|
114
|
+
// This prevents forms from trying to open new windows (which fail silently in WebView)
|
|
115
|
+
const originalSubmit = HTMLFormElement.prototype.submit;
|
|
116
|
+
HTMLFormElement.prototype.submit = function() {
|
|
117
|
+
if (this.target === '_blank') {
|
|
118
|
+
this.target = '_self';
|
|
119
|
+
}
|
|
120
|
+
return originalSubmit.call(this);
|
|
121
|
+
};
|
|
122
|
+
|
|
113
123
|
// Intercepting window.open
|
|
114
124
|
const originalWindowOpen = window.open;
|
|
115
125
|
window.open = function(url, target, features) {
|