Need to click twice on empty element Chrome
kritollm opened this issue · 5 comments
Description
Need to click twice on empty element Chrome
Steps to reproduce
- Click on empty element
- Try to write
- Click on empty element and write
**Expected behavior:**Only need to click once to focus and write
Actual behavior: Need to click twice
Versions
- medium-editor: 5.23.3
- browser: Chrome 84.0.4147.105
- OS: Windows
Confirmed. Though for me it only happens if I click on the placeholder text. If I click on another part of the element it receives focus straight away.
I'm fairly sure this is a bug with chrome as the contenteditable element remains focused and yet doesn't allow keyboard input. A way around this is to set hideOnClick: false
in settings if you're ok with that option.
Hi.
Thanks for a solution that worked. Seems like this only applies to Chrome, but there may be a way to fix it. I think I experienced the bug at the same time as Chrome got a black frame around focused elements.
The biggest problem is with copy/paste. The text is pasted into the element you are copying it from (if you don't click twice first). That problem was also solved with hideOnClick: false
.
I found a workaround by adding this style : .medium-editor-element:after{ content: ""; }
So you can leave the option hideOnClick: true
I found a workaround by adding this style :
.medium-editor-element:after{ content: ""; }
So you can leave the optionhideOnClick: true
Perfect, thank you! Was really bugging me!