Skip to content

PB-294: Avoid reloading the application when entering ENTER in import file #711

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 18, 2024

Conversation

ltshb
Copy link
Contributor

@ltshb ltshb commented Mar 15, 2024

In import file when entering enter with an invalid url field, it triggered a
page reload. This was due to the fact that the loadFile() was triggered with
an invalid url which triggered a fetch to the current host, reloading the app.

Now we prevent calling loadFile() if the url is not valid.

Test link

@github-actions github-actions bot added the bug label Mar 15, 2024
@ltshb ltshb requested a review from LukasJoss March 15, 2024 10:23
Copy link

cypress bot commented Mar 15, 2024

Passing run #1137 ↗︎

0 172 22 0 Flakiness 0

Details:

PB-294: Prevent default behavior of form
Project: web-mapviewer Commit: 51adc12a3a
Status: Passed Duration: 04:41 💡
Started: Mar 18, 2024 5:33 AM Ended: Mar 18, 2024 5:37 AM

Review all test suite changes for PR #711 ↗︎

ltshb added 2 commits March 18, 2024 06:29
… file

In import file when entering enter with an invalid url field, it triggered a
page reload. This was due to the fact that the `loadFile()` was triggered with
an invalid url which triggered a fetch to the current host, reloading the app.

Now we prevent calling loadFile() if the url is not valid.
An HTML form default behavior en keydow.enter is to submit the form which may
trigger a page reload. Therefore remove the form as we don't really need it
here and use `prevent` modifier for extra future security.
@ltshb ltshb force-pushed the bug-PB-294-import branch from 633701c to 51adc12 Compare March 18, 2024 05:29
@ltshb ltshb merged commit c7f62c6 into develop Mar 18, 2024
6 checks passed
@ltshb ltshb deleted the bug-PB-294-import branch March 18, 2024 05:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants