different table behavior when erasing text via backspace
See original GitHub issuesteps to reproduce:
- open https://summernote.org/
- create table 2x2
- type any string, make new line with enter, type in different string
- press backspace to remove everything entered
- in FF and Chrome you will remove the text but with different outcome.
in Chrome the caret will remove all text but this markup <p><br></p>
will stay in the cell which can’t be removed with backspace or delete or in any other way.
in FF there will also stay <br>
tag but without the <p>
tag.
What is your Operating System, Browser and Version and Summernote Version you are using:
-
Operating System: [x] Microsoft Windows [ ] Apple [ ] Linux [ ] All
-
Browser and Version: [ ] Brave [x] Chrome Version 92.0.4515.131 (Official Build) (64-bit) [ ] Edge [x] Firefox 91 x64 [ ] Internet Explorer [ ] Opera [ ] Safari [ ] Other (Specify):
-
Summernote Version, place an x inside the brackets: [ ] BS3 [ ] BS4 [ ] Lite [x] All
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
Backspace and Delete functions back to front when editing ...
I select the cells/table I wish to clear and press "backspace" to clear the text as essentially that's what I'm doing, 'backspacing' the...
Read more >Style Changes When "Backspace" Joins Two Separate ...
When you join two paragraphs by pressing Backspace, Word deletes the paragraph mark that separates the paragraphs and then applies the style of...
Read more >The Linux keyboard and console HOWTO
The Motif spec says that Backspace is supposed to delete the previous character and Delete is supposed to delete the following character. Linux...
Read more >Microsoft Word deletes a space along with the ... - Super User
Microsoft Word deletes a space along with the word when pressing Ctrl+Backspace. How do I prevent it from removing the space? · Use...
Read more >Why is there a difference in text length with backspace or ...
Delete is character code 127 in the ASCII-Table. The delete char is written into the textinput and therefore counts to the length of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Great, Dennis. In a version without
emptyPara
you can even replaceif (rng.isCollapsed() && rng.isOnCell()) {
withif (rng.isCollapsed() /* && rng.isOnCell() */) {
This would allow you to empty the whole editor.It’s ok, I found where to put it, I had to change the function slightly, as what you see in the built package, is different in typescript namely the function name and assigning the vars, but it looks like it works.