Open kylecombes opened 1 month ago
It seems to be an artifact of using ClipboardJS with a pre
element. If I change the pre
element to a standard input, set its value to the JWT, and then click the copy button, the JWT is copied without the leading newlines. Perhaps the fix here is to replace the pre
with a textarea
.
The Bug
The value copied to the clipboard when clicking "Copy JWT to Clipboard" includes two newline characters.
Steps to Reproduce
Expected Behavior
The value pasted in the editor should begin with the first alphanumeric character of the JWT and end with the last. There should be no whitespace pasted.
Observed Behavior
Two newlines are inserted prefixing the JWT itself.
Why this is a Problem
I pasted the value into an input that converted the newlines to spaces and I didn't even realize they were there. They eventually caused some problems, and I had to dig until discovering the extraneous whitespace characters. It's not a major issue, but it did cause me some confusion.