-
Notifications
You must be signed in to change notification settings - Fork 102
Description
Prerequisites
- I verified that this is not a filter list issue. Report any issues with filter lists or broken website functionality in the uAssets issue tracker.
- This is NOT a YouTube, Facebook or Twitch report. These sites MUST be reported by clicking their respective links.
- I performed a cursory search of the issue tracker to avoid opening a duplicate issue.
- The issue is not present after disabling uBO in the browser.
- I checked the documentation to understand that the issue I am reporting is not normal behavior.
I tried to reproduce the issue when...
- uBO is the only extension.
- using a new, unmodified browser profile.
Description
Related: gorhill/uBlock#3271. Posting a new issue since that one is restricted only to prior contributors.
If you have any unsaved changes in "My filters", they will get reverted if you happen to add any new filters via Picker, Logger or DOM Inspector.
This can easily happen if you get a notification (email, rss, etc.) that takes you away from "My filters" you're currently editing. Or if you simply navigate to one of the sites you're trying to cleanup filters for (perhaps just group them together) in your custom filters and see a new annoyance you want to hide.
I know I've had this happen multiple times before, but only actually noticed the reason today.
A specific URL where the issue occurs.
/dashboard.html#1p-filters.htmlSteps to Reproduce
Version 1:
- Open "My filters".
- Edit some lines. Don't apply changes.
- Change browser tabs.
- Add a filter e.g. via picker.
- Go back to "My filters".
- See new filter added and prior changes appearing applied.
- Go back to the website you just filtered.
- Add a new filter.
- Go back to "My filters".
- Both filters are added, but the "original unsaved changes" got reverted.
Version 2:
- Open "My filters".
- Edit some lines. Don't apply changes.
- Change browser tabs.
- Add a filter e.g. via picker. Twice*.
- Go back to "My filters".
- Both filters are added, but the "unsaved changes" got reverted.
Version 3:
- Open "My filters".
- Comment out the last line. Don't apply changes.
- Change browser tabs.
- Add a filter e.g. via picker.
- Go back to "My filters".
- See the new filter added above the unsaved comment. Displayed as saved.
- Go back to the website you just filtered.
- Add a new filter.
- Go back to "My filters".
- Both filters are added, but the "original unsaved changes" got reverted.
* Two filters need to be added separately. Adding two or more filters at once (DOM Inspector) still required a 2nd addition for the changes to revert automatically.
Version 4:
- Start as above.
- After adding the first filter refresh the tab, change panes or close the tab and go back to it to see changes reverted.
Expected behavior
If you have unsaved changes adding new filters via uBO's tools should either:
- Save the changes and add the new filter.
- Warn you about unsaved changes getting undone if you proceed and let you save them.
Actual behavior
Unsaved changes get reverted.
Video
uBO-My-filters-unsaved-changes-revert-on-Picker-use.mp4
Configuration
Details
uBlock Origin: 1.68.1b7
Firefox: 145
filterset (summary):
network: 162819
cosmetic: 80923
scriptlet: 34987
html: 2800
listset (total-discarded, last-updated):
added:
block-lan: 89-0, 21d.15h.42m
fanboy-cookiemonster: 44978-149, 3d.21h.37m
ublock-cookies-easylist: 5265-43, 17h.23m
default:
user-filters: 127-0, never
ublock-filters: 43886-69, 1d.2h.25m
ublock-badware: 11073-32, 1h.48m Δ
ublock-privacy: 3562-2, 1h.48m Δ
ublock-unbreak: 2777-1, 1h.48m Δ
ublock-quick-fixes: 373-10, 1h.48m Δ
easylist: 84703-149, 1d.1h.25m
easyprivacy: 55108-32, 1d.1h.25m
urlhaus-1: 27715-6, 6h.23m
plowe-0: 3486-988, 11d.6h.41m
filterset (user): [array of 106 redacted]
hostRuleset:
added: [array of 175 redacted]
urlRuleset:
added: [array of 1 redacted]
userSettings:
advancedUserEnabled: true
userFiltersTrusted: true
hiddenSettings:
autoCommentFilterTemplate: {{isodate}} {{origin}}
supportStats:
allReadyAfter: 633 ms (selfie)
maxAssetCacheWait: 103 ms
cacheBackend: indexedDB