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

Input command should not be auto-corrected (#7424) #7462

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

NicolasBuquet
Copy link

Fix #7424

Pull Request Checklist

  • [ x] I read the contributing guide
  • UI change has been tested on both light and dark themes, in portrait and landscape orientations and on iPhone and iPad simulators
  • Accessibility has been taken into account.
  • [x ] Pull request is based on the develop branch
  • [x ] Pull request contains a changelog file in ./changelog.d
  • [ x] You've made a self review of your PR
  • Pull request includes screenshots or videos of UI changes
  • [ x] Pull request includes a sign off

Signed-off-by: Nicolas Buquet [email protected]

Comment on lines +23 to +25
// Triggers auto-correct if needed and if it is not a command.
let isCommand = self.textMessage.hasPrefix("/")
if self.isFirstResponder && !isCommand {
Copy link
Contributor

@aringenbach aringenbach Jun 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the issue with that code is that it will only avoid triggering that last auto-correction that happens upon sending the message, and it will still still trigger upon typing.
I suppose we could do something similar that what the RTE does if it works: https://github.com/matrix-org/matrix-rich-text-editor/blob/main/platforms/ios/lib/WysiwygComposer/Sources/WysiwygComposer/Extensions/UITextView.swift

(triggered when the text changes, so we could evaluate that at the same moment we evaluate for mentions text trigger)

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Nicolas Buquet seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

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

Successfully merging this pull request may close these issues.

Input command should not be auto-corrected
3 participants