diff --git a/lona/client/_lona/client/input-events.js b/lona/client/_lona/client/input-events.js index 25b95799..a088f833 100644 --- a/lona/client/_lona/client/input-events.js +++ b/lona/client/_lona/client/input-events.js @@ -202,6 +202,8 @@ export class LonaInputEventHandler { }; _patch_onsubmit(node) { + var lona_window = this.lona_window; + node.onsubmit = function(event) { event.preventDefault(); event.stopPropagation(); diff --git a/lona/client2/_lona/client2/input-events.js b/lona/client2/_lona/client2/input-events.js index c341b1ca..41174a13 100644 --- a/lona/client2/_lona/client2/input-events.js +++ b/lona/client2/_lona/client2/input-events.js @@ -202,6 +202,8 @@ export class LonaInputEventHandler { }; _patch_onsubmit(node) { + var lona_window = this.lona_window; + node.onsubmit = function(event) { event.preventDefault(); event.stopPropagation(); diff --git a/tests/test_0305_requests.py b/tests/test_0305_requests.py new file mode 100644 index 00000000..123974a0 --- /dev/null +++ b/tests/test_0305_requests.py @@ -0,0 +1,60 @@ +async def test_post_requests(lona_app_context): + """ + This test checks if