chart-tool icon indicating copy to clipboard operation
chart-tool copied to clipboard

Missing newlines in pasteData textarea for Firefox on OSX

Open monkeycycle opened this issue 4 years ago • 3 comments

firefox-osx-textarea-missing-newlines

Firefox collapses newlines in the editor textarea and all rows become one long one. This occurs when pasting from a spreadsheet to create a new chart and when opening an existing chart, created using Chrome, with Firefox.

Charts render fine and the newlines appear to function when viewed in Chrome and in the downloaded data. This issue prevents editing data within the textarea which isn't its primary purpose but a welcome bonus.

Firefox (81.0 (64-bit)) on OSX (10.15.6 (19G2021)

monkeycycle avatar Sep 30 '20 16:09 monkeycycle

@tomcardoso I ran across this same issue today with an editor at the Post-Disaptch.

Kirkman avatar Apr 30 '21 16:04 Kirkman

Hmmm, good to know. I'm planning on circling back to Chart Tool in the near-ish future (we're going to be finally hammering out an AWS deploy using something like Terraform, to make future deployments a breeze), so I'll try and address this then.

tomcardoso avatar Apr 30 '21 16:04 tomcardoso

Looks like the fix is to change from white-space: nowrap to white-space: pre-wrap on the textarea.

Adding the following to custom/custom.scss is serving as a temporary fix for us:

// Avoid text wrapping problem in Firefox
textarea.input-data-edit { white-space: pre-wrap; }

Kirkman avatar Jun 03 '21 18:06 Kirkman