-
Notifications
You must be signed in to change notification settings - Fork 12.4k
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
[Alerting] Avoid invalid characters in copied rule expression #57839
Conversation
Nice one! Should we add code comment saying we shouldn’t pass the readOnly prop and link it to this PR in case the next person who looks at this wants to add it? :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice finding! LGTM
Good idea! Done. |
Drone build failed: https://drone.grafana.net/grafana/grafana-enterprise/39824 |
What is this feature?
Allows to copy rule expressions without adding invalid characters in the pasted text.
Why do we need this feature?
Copying an expression and pasting it resulted in text that contained unwanted UTF-8 byte order mark characters.
Which issue(s) does this PR fix?:
Fixes #57610
Special notes for your reviewer:
Before:
After:
The issue happened when the
slate-react
's Editor had thereadOnly=true
prop. Setting it tofalse
prevents it from happening, but the editor is still non-editable regardless of that. The issue is reported in the Slate repo: ianstormtaylor/slate#2597