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

Formatting as title causes breaks editing due to wrong cursor position (in Safari) #567

Closed
rluba opened this issue Nov 8, 2018 · 3 comments
Labels

Comments

@rluba
Copy link
Contributor

rluba commented Nov 8, 2018

In latest Safari, when formatting something as "Title" you can no longer continue editing properly:

  • Pressing enter after the last character causes the last character to jump into the next line
  • Continuing to type after the last character constantly overwrites the last character instead of appending

safari

Steps to Reproduce
  1. Type something
  2. Format as title
  3. Continue typing anything
  4. 🔥
Details
  • Trix version: 1.0.0
  • Browser name and version: Safari 12.0 (14606.1.36.1.9)
  • Operating system: MacOS 10.14 (Mojave)
@rluba
Copy link
Contributor Author

rluba commented Nov 8, 2018

Nevermind. This seems to happen only in combination with our data-binding. For example, I can’t reproduce it on https://trix-editor.org.

I’ll investigate it further and reopen, if necessary. Sorry for posting prematurely.

@rluba rluba closed this as completed Nov 8, 2018
@rluba
Copy link
Contributor Author

rluba commented Nov 9, 2018

The bug was triggered by our CSS – of all things!

We use a CSS workaround for an old Chrome bug that causes the first letter of headings to be printed incorrectly:

h1::first-letter {
    margin-top: 0;
}

For some reason, we put this rule outside our @media print block and for some very weird reason, this CSS snippet caused Trix to fail miserably when editing headings – but only in Safari.

Chrome has since fixed this issue, so I simply deleted the CSS rule and everything’s fine.

@javan Not sure if it’s even worth investigating on Trix’s side why this CSS rule can cause editing to misbehave…

@rluba rluba reopened this Nov 9, 2018
@stale
Copy link

stale bot commented Feb 7, 2019

This issue has been automatically marked as stale after 90 days of inactivity. It will be closed if no further activity occurs.

@stale stale bot added the stale label Feb 7, 2019
@rluba rluba closed this as completed Feb 7, 2019
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

1 participant