Skip to content
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

Bug fix: Delete confirm dialog will work wrong aflter cancel. #942

Merged
merged 2 commits into from
Jan 19, 2023
Merged

Conversation

fbotp
Copy link
Contributor

@fbotp fbotp commented Jan 18, 2023

Clicking and canceling the delete confirm dialog will cause the information when the last confirmation of deletion is the file/directory information of the first click on the delete button.
Example on Demo:
屏幕录制2023-01-18-09 23 43

@@ -4008,6 +4008,9 @@ function confirmDailog(e, id = 0, title = "Action", content = "", action = null)
let tpl = $("#js-tpl-confirm").html();
$(".modal.confirmDailog").remove();
$('#wrapper').append(template(tpl,tplObj));
$("#confirmDialog-"+tplObj.id).on('hidden.bs.modal', function() {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as we are using same selector on next line as well, better catch the selector.

const $confirmDailog = $("#confirmDialog-"+tplObj.id);
$confirmDailog.on('hidden.bs.modal', function() {..}
$confirmDailog.modal('show');

@prasathmani prasathmani merged commit 69ccd95 into prasathmani:master Jan 19, 2023
ner00 pushed a commit to ner00/tinyfilemanager that referenced this pull request May 7, 2023
…hmani#942)

* Bug fix: Only delete first file/directory when clicking the delete button multiple times and canceling.

* Add variable name for delete dialog
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.

None yet

2 participants