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 (#777) #798

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@ import GBDeviceInfo

extension RoomInputToolbarView {
open override func sendCurrentMessage() {
// Triggers auto-correct if needed.
if self.isFirstResponder {
// Tchap fix : don't autocorrecxt if it is a command (starts with a '/')
// Tchap fix will be removed when Element fix will come via rebase (https://github.com/vector-im/element-ios/pull/7462)
// Triggers auto-correct if needed and if it is not a command.
NicolasBuquet marked this conversation as resolved.
Show resolved Hide resolved
let isCommand = self.textMessage.hasPrefix("/")
if self.isFirstResponder && !isCommand {
let temp = UITextField(frame: .zero)
temp.isHidden = true
self.addSubview(temp)
Expand Down