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

Desktop: Fix crash on opening certain plugin dialogs #10838

Conversation

personalizedrefrigerator
Copy link
Collaborator

@personalizedrefrigerator personalizedrefrigerator commented Aug 6, 2024

Summary

This pull request fixes a crash from .classList.add:

Failed to execute 'add' on 'DOMTokenList': The token provided must not be empty.

This was caused by certain dialogs that have a className property that starts or ends with a space, including the dialog created by the Freehand Drawing plugin. In particular, "these are css-class-names ".split(/\s+/) is ['these', 'are', 'css-class-names', ''], which includes an invalid CSS class name.

Testing plan

  1. Open the Freehand Drawing plugin's drawing dialog.

@laurent22 laurent22 merged commit af7e172 into laurent22:dev Aug 8, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants