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

Impossible to delete rule from 'my rules' tab ? #1805

Closed
dhowe opened this issue Apr 10, 2021 · 5 comments
Closed

Impossible to delete rule from 'my rules' tab ? #1805

dhowe opened this issue Apr 10, 2021 · 5 comments

Comments

@dhowe
Copy link
Owner

dhowe commented Apr 10, 2021

  • to recreate: add a rule, e.g. "* doubleclick.net * strictBlock",
  • save
  • commit
  • close prefs
  • re-open
  • attempt to delete rule
@dhowe dhowe changed the title Impossible to delete rule from 'my rules' tab Impossible to delete rule from 'my rules' tab ? Apr 10, 2021
@cqx931
Copy link
Collaborator

cqx931 commented Apr 10, 2021

seems to me that the the storage and rules are correctly removed in the background but something weird is going on with the code-mirror interface itself.

@dhowe
Copy link
Owner Author

dhowe commented Apr 14, 2021

this seems to be part of a larger problem with code-mirror in 'my rules'
is code-mirror used elsewhere? we need to check the functioning (and css styling) of all code-mirror instances

see also #1793

@dhowe dhowe added this to the Release 3.9.401 milestone Apr 14, 2021
@mneunomne
Copy link
Collaborator

Yes there are some other issues when you trying to change a rule from block to strictBlock for instance, as described here:

My rules editor -> my rules editor seems to have some problem with strictBlock, after saving and commiting a line with strictBlock the line cant not be change to block allow or noop (when click save, the action changes to undefine and highlighted in codeMirror)...

#1738 (comment)

I'm not sure the issue is with codemirror, I will try to do some test to at least find out where exactly is the problem coming from.

@cqx931
Copy link
Collaborator

cqx931 commented Apr 15, 2021

The issue lies in setCell(), which seems to work for adding but not for removing. When removeFromRuleParts() is called, newBitmap should be 0 but now it remains 4 thus, can't be removed.

Fixing attempt: b56ed5f

@mneunomne
Copy link
Collaborator

@cqx931 Nice, It seems like it is working as expected now. Have also tested changing from strictBlock to block which was also causing a bug for example, and it is working.

@dhowe dhowe closed this as completed in b56ed5f Apr 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants