AdguardBrowserExtension icon indicating copy to clipboard operation
AdguardBrowserExtension copied to clipboard

[estimate] Handling rapid consecutive saves of User Rules

Open scripthunter7 opened this issue 9 months ago • 1 comments

When saving user rules quickly one after another, the save button unlocks too early while the previous save is still being processed. I am attaching a gif; in the first case, I allow time for the save, and in the second case, I immediately try to save again by pressing CTRL+S. In the second case, the button unlocks because I modified the content, so visually, I might think I can save, but the save actually only happens on the second CTRL+S press after I waited a bit.

This case should be handled better, at least visually, and if there is unsaved content, it would be worth considering an alert when the user tries to close the page to prevent modifications from being lost.

Just in case, we also need to make sure that a race condition will not cause any issues when saving quickly one after another.

Image

scripthunter7 avatar Mar 18 '25 12:03 scripthunter7

Or just don't unblock the Save button, until all operations are completed (probably, it is related to engine restart - there is no such problem in 4.1.55)

Alex-302 avatar Mar 18 '25 13:03 Alex-302