Prevent desktop reloads at the wry level (#4422)
* Prevent desktop reloads at the wry level * add a test * only allow one navigation
This commit is contained in:
1 parent
393246b923
commit
0d2e1f4051
7 files changed
+124
-20
No files matched your search
@@ -278,15 +278,6 @@ export class NativeInterpreter extends JSChannel_ {
|
||||
bubbles,
|
||||
};
|
||||
|
||||
// This should:
|
||||
// - prevent form submissions from navigating
|
||||
// - prevent anchor tags from navigating
|
||||
// - prevent buttons from submitting forms
|
||||
// - let the virtualdom attempt to prevent the event
|
||||
if (event.type === "submit") {
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
// liveview does not have synchronous event handling, so we need to send the event to the host
|
||||
if (this.liveview) {
|
||||
// Okay, so the user might've requested some files to be read
|
||||
|
||||
Reference in new issue
Block a user