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

Starting a new paragraph in Safari sometimes doesn't insert text until after two keystrokes #1141

Open
pilaf opened this issue Mar 22, 2024 · 6 comments

Comments

@pilaf
Copy link

pilaf commented Mar 22, 2024

Under some circumstances typing at the beginning of a new paragraph requires two keystrokes for text to start appearing.

Steps to Reproduce
  1. Open https://trix-editor.org/ in Safari
  2. Place caret at top of existing Trix document
  3. Enter two short paragraphs (a single character each is enough)
  4. Start a 3rd paragraph and type a single keystroke, it has no effect
  5. Type a second keystroke, suddenly two characters are inserted at once

Clearing the entire document and starting over removes the bug, but adding a single paragraph and then starting over from step 1 (at the top of document) brings the bug back. In other words, there must be text below the caret for the bug to trigger.

Details
  • Trix version: tried it on 2.0.7 through 2.0.10
  • Browser name and version: Safari 17.3.1
  • Operating system: macOS
@michaellenaghan
Copy link

For what it's worth, I'm having trouble reproducing this.

I'm using Safari 17.4 on macOS Sonoma 14.4.

I went to https://trix-editor.org/.

I placed the caret at the top of the document.

I typed "x ".

I typed "y ".

I typed "z ".

No issues.

Am I missing something?

@pilaf
Copy link
Author

pilaf commented Mar 28, 2024

@michaellenaghan Odd, when I reported this the other day I could very easily reproduce it with just those steps in both trix-editor.org and my own app, but now I'm having to fool around a bit longer before it triggers.

In any case, I've now reproduced on two Macs, one with macOS 14.2.1 (Safari 17.2.1) and one with 14.3.1 (Safari 17.3.1), both with no Safari extensions installed.

I don't have exact steps yet but I think it may have to do with Safari's spelling suggestions, the bug seems to trigger more often right after I auto-correct a word. I'll keep trying to find a consistent way to reproduce it though.

I could also try to record my screen but I need to figure out how to include my keystrokes in the screencap...

@pilaf
Copy link
Author

pilaf commented Mar 28, 2024

Here's a screencap with what I think is a sure way to reproduce it (I consistently reproduced it on both Macs this way). Better if you watch it with audio so you can hear the keystrokes.

Ignore my previous comment about spelling corrections, I think that was probably a red herring.

trixbug.mp4

@michaellenaghan
Copy link

I tried doing exactly what you're doing, many times, but couldn't reproduce your result. Obviously, I don't know why! (Well, other than the obvious: we're using different versions of Safari.)

One thought: do you have any extensions running?

Btw, to be clear, I'm not affiliated with the project; I was just looking through the issues to get a feel for where the project is at.

@afcapel
Copy link
Contributor

afcapel commented Mar 28, 2024

There was recently a bug that was affecting autocorrect edits in Safari, that we fixed in #1131., shipped in v2.0.10. It may be related.

@pilaf
Copy link
Author

pilaf commented Mar 30, 2024

@michaellenaghan

One thought: do you have any extensions running?

No, zero Safari extensions in both machines that I tested on.

we're using different versions of Safari

Yeah, maybe it's been fixed in Safari 17.4, I'll update my machine and test again.

Btw, to be clear, I'm not affiliated with the project

I figured that a bit after replying to you 😅 , but still thanks for commenting as that ended up adding information to the ticket.

@afcapel

There was recently a bug that was affecting autocorrect edits in Safari, that we fixed in #1131., shipped in v2.0.10. It may be related.

AFAICT trix-editor.org's demo is using 2.1.0, so the fix you mention should be included, right? Yet I can reproduce this bug there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants