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

innerText or Similar Removes Double Spaces #866

Open
wbotelhos opened this issue Dec 9, 2023 · 1 comment
Open

innerText or Similar Removes Double Spaces #866

wbotelhos opened this issue Dec 9, 2023 · 1 comment
Labels

Comments

@wbotelhos
Copy link

🐛 Bug Report

Expected Behaviour

Given a <div>Multiple Spaces</div>
When I copy the content of it
Then I should get Multiple Spaces

Actual Behaviour

Given a <div>Multiple Spaces</div>
When I copy the content of it
Then I actually get Multiple Spaces

To Reproduce

  1. Add any two or more space for a element content
  2. Execute the copy command
  3. You'll get a squished text

Browsers Affected

  1. Brave
  2. Chrome

Not tested others

Operational System

13.3.1 (a) (22E772610a) Apple M2

Temporary Solutions

Set the text into an attribute like data-clipboard-text instead use a tag content. By the way the browser squish it too, so display the text for a plain user copy is not a cool thing.

Question

Is there any way of add a innerText or innerHTML option?

@wbotelhos wbotelhos added the bug label Dec 9, 2023
@obetomuniz
Copy link
Collaborator

@wbotelhos, that's a great catch. I'm planning to contribute to some open issues. Soon I will be triaging it and proposing a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants