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

Cannot completely clear the field #121

Closed
SnidelyWhiplash opened this issue Dec 17, 2020 · 1 comment
Closed

Cannot completely clear the field #121

SnidelyWhiplash opened this issue Dec 17, 2020 · 1 comment

Comments

@SnidelyWhiplash
Copy link

SnidelyWhiplash commented Dec 17, 2020

When adding some text, then backspacing all the way, the placeholder does not restore. And when saving, the content that persists is a single <br> tag.

I think it's because the elseif on this line is commented out.

Placing if (content.innerHTML === '<br>') content.innerHTML = ''; on its own line below seems to solve the problem. Not sure if there are any adverse side-effects.

@SnidelyWhiplash
Copy link
Author

This appears to be fixed, thanks!

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

No branches or pull requests

1 participant