Skip to content

[Bug] Reset file input after upload in Draw panel#6446

Merged
rldhont merged 1 commit into3liz:masterfrom
mind84:draw_upload_feat_managmenent
Jan 31, 2026
Merged

[Bug] Reset file input after upload in Draw panel#6446
rldhont merged 1 commit into3liz:masterfrom
mind84:draw_upload_feat_managmenent

Conversation

@mind84
Copy link
Copy Markdown
Collaborator

@mind84 mind84 commented Jan 22, 2026

If you load a file into the drawing panel and delete the newly added feature, and then want to load the same old file, the feature will not be added.

vokoscreenNG-2026-01-22_10-34-50.webm

The reason is related to the input file which cannot trigger the change event since it maintains the reference to the same file.

A quick solution is to reset the input value as soon as the feature is loaded, but it's important to first define how this functionality is intended.

In my opinion, uploading is intended only as a quick way to draw/replicate a feature, which the user can then make changes to. It should also be possible to reload the same feature, even multiple times. In this scenario, the file name next to the input would be understood as "last uploaded file", otherwise it would lose any further relevance.

Alternatively, it should be possible for the user to manually reset the input file, but this seems a bit over-engineered for such a feature to me.

What do you think?

Backport relaese 3.9 and 3.10

Funded by Faunalia

@github-actions github-actions Bot added this to the 3.11.0 milestone Jan 22, 2026
@mind84 mind84 changed the title reset file input after upload [Bug] Reset file input after upload in Draw panel Jan 22, 2026
@mind84 mind84 marked this pull request as ready for review January 27, 2026 09:22
@rldhont
Copy link
Copy Markdown
Collaborator

rldhont commented Jan 27, 2026

@mind84 are you able to add an e2e test ?

@rldhont rldhont added sponsored development This development has been funded javascript Pull requests that update Javascript code backport release_3_9 draw Drawing tools backport release_3_10 labels Jan 27, 2026
@mind84
Copy link
Copy Markdown
Collaborator Author

mind84 commented Jan 28, 2026

@mind84 are you able to add an e2e test ?

@rldhont not immediately but yes

@rldhont
Copy link
Copy Markdown
Collaborator

rldhont commented Jan 31, 2026

I have rebuild the draw import tests and will be able to add a test for your fix #6507

@rldhont rldhont merged commit 4a8dd6d into 3liz:master Jan 31, 2026
18 checks passed
rldhont added a commit to rldhont/lizmap-web-client that referenced this pull request Jan 31, 2026
3liz-bot pushed a commit that referenced this pull request Feb 1, 2026
3liz-bot pushed a commit that referenced this pull request Feb 1, 2026
@mind84
Copy link
Copy Markdown
Collaborator Author

mind84 commented Feb 5, 2026

Hi @rldhont,

I have rebuild the draw import tests and will be able to add a test for your fix #6507

Thank you for taking on this task.

Unfortunately, I haven't had much time to work on Lizmap these days.

Thanks again.

@mind84 mind84 deleted the draw_upload_feat_managmenent branch February 5, 2026 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport release_3_9 backport release_3_10 draw Drawing tools javascript Pull requests that update Javascript code sponsored development This development has been funded

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants