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

Pressing spacebar before a formula deletes the rest of the lile #2

Closed
milossramek opened this issue Mar 28, 2020 · 7 comments
Closed
Labels
bug Something isn't working

Comments

@milossramek
Copy link

Hi,
I observe a problem with the math module. If I place cursor just in front of a formula and press the space bar, the formula and everything after it is deleted till the end of the line

How to test:
Start any of the jffiddle.net demos
Place the cursor after the "Lorem.." text (either directly after the last dot or directly in front of the formula)
Hit the space bar. The formula and the text after the cursor vanish (both in inline and display modes)

@milossramek
Copy link
Author

The behaviour is sometimes different: hitting the space bar leads to line break. It can be tested by adding the line

dvojný integrál — určitý integrál funkcie dvoch premenných \(f(x, y)\) cez rovinnú oblasť \(D\):

to the text (for example in the jsfiddle.net demo) and by pressing the space bar right before the formula D at the end. In this case also Undo stops working.

@milossramek
Copy link
Author

Something similar happens also in the case when a formula is at the end of a line. If cursor is behind the formula and one presses the space bar, the formula vanishes

@isaul32
Copy link
Owner

isaul32 commented Mar 30, 2020

Hello,

This is a interesting bug. I think this happen only when use Firefox (at least it work properly in Chrome). This needs some debugging.

@ddmm-white
Copy link

Hi. I encountered the same issue. Formula disappears if whitespace is inserted right after a formula. Also it's not possible to place cursor after a formula using mouse in Firefox (you can only move cursor using arrow keys).
recording

@isaul32
Copy link
Owner

isaul32 commented Apr 5, 2020

I changed editingDowncast container class from div to span (https://github.com/isaul32/ckeditor5-math/blob/master/src/mathediting.js#L128). I think this fix space before formula issue.

@isaul32
Copy link
Owner

isaul32 commented Apr 5, 2020

Relates to ckeditor/ckeditor5#6532

@isaul32
Copy link
Owner

isaul32 commented May 12, 2020

Fixed in v19.0.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants