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

delete key on empty textarea in wysiwyg mode does not clear formatting tags in some cases #35

Open
jywarren opened this issue Aug 2, 2016 · 1 comment
Labels

Comments

@jywarren
Copy link
Collaborator

jywarren commented Aug 2, 2016

I've found a small issue I'm able to reproduce if:

  1. HTML (an h1) already exists at load-time in the .wk-wysiwyg element (wysiwyg mode)
  2. All content in the contentEditable div is selected and deleted
  3. Delete key is hit once again to leave the div completely empty
  4. New text is typed into the div
  5. h1 text appears, not plain p text

Note that to clear this formatting, you can click outside the div and click back in. This makes me think that there's some preserved formatting state in this (chromium) contentEditable which is cleared when it loses focus.

You can try it here: https://publiclab.github.io/PublicLab.Editor/examples/

Although I'm not able to reproduce it on the default demo at https://bevacqua.github.io/woofmark/ -- and I'm wondering if there's something about the interaction of the stylesheets with the contentEditable that causes it in one demo but not another.

@jywarren jywarren added the bug label Aug 2, 2016
@bevacqua
Copy link
Owner

bevacqua commented Aug 2, 2016

Works as expected for me in Chrome.

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