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

Weird autocorrect behavior: #28

Closed
Parth opened this issue Jan 13, 2021 · 5 comments
Closed

Weird autocorrect behavior: #28

Parth opened this issue Jan 13, 2021 · 5 comments
Assignees
Labels
bug Something isn't working UIKit Issues related to the iOS UIKit editor

Comments

@Parth
Copy link

Parth commented Jan 13, 2021

Describe the bug

On my phone, typing Im into a TextEditor will highlight the text and suggest the word I'm as an autocorrect replacement. If I tap spacebar it'll accept the suggestion, and put my cursor over I'm | <-- here.

In this library if I tap Im it will auto correct to I'|m after which tapping the spacebar (the normal behavior) I'll be in this state: I' m. For my use case turning autocorrectionType(.off) would be a disappointment.

I can try to capture a video if you have trouble reproducing this.

@Parth Parth added the bug Something isn't working label Jan 13, 2021
@Parth
Copy link
Author

Parth commented Jan 13, 2021

Interestingly this doesn't happen on new documents.

@kyle-n
Copy link
Owner

kyle-n commented Jan 13, 2021

Yeah, I'm not sure how to reproduce this. I booted up a simulator and when I typed "I", "m" and space, it autocorrected to I'm. This may be something to do with iOS autocorrect?

I would recommend:

  • Try to reproduce the bug on a new device or simulator, not a personal phone which may have a previously affected iOS dictionary
  • Reset the affected device's dictionary to reset autocorrect (how to)

If none of that works, please provide:

  • Exact version of iOS / iPadOS / macOS where your app was running when you saw the bug
  • Is your app using AppKit or UIKit? If your app is for iOS or Mac Catalyst, it is UIKit. If it is for macOS natively, it is using AppKit.
  • The file in which HLTE is being used

@Parth
Copy link
Author

Parth commented Jan 13, 2021

@kyle-n this is on a simulator: https://youtu.be/lOoK9TifNKo

our app is targeting everything, but the bug is only experienced on ios / ipados -- where autocorrection is enabled.

I used the text of my bug report. I said before that this doesn't happen on new documents, I think this is incorrect, I think this doesn't happen at the edges of a document, but happen in the middle of a new document as well.

these are some facts from the simulator:
image

@kyle-n
Copy link
Owner

kyle-n commented Jan 13, 2021

Awesome, that video did the trick. I can reproduce in the UIKit editor with these steps:

  • Create an HLTE instance with multiple lines of text
  • Move the insertion point to the end of any paragraph that is not last
  • Press enter and type "I" and "m"
  • Observe that "Im" has autocorrected to "I'm" and the insertion point is now between the apostrophe and the "m"

The editor handles autocorrect correctly when typing at the end of the editor's current content, but not when typing anywhere else.

I will investigate and try to figure out what's happening here. 👍

@kyle-n kyle-n added the UIKit Issues related to the iOS UIKit editor label Feb 8, 2021
@kyle-n
Copy link
Owner

kyle-n commented Jun 1, 2021

I'm not sure what change did it, but I can no longer reproduce this bug using the the steps to reproduce I laid out. @Parth are you still seeing this? If not, I'll close this Sunday.

@kyle-n kyle-n closed this as completed Jun 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working UIKit Issues related to the iOS UIKit editor
Projects
None yet
Development

No branches or pull requests

2 participants