Skip to content

Commit

Permalink
Input command should not be auto-corrected (element-hq#7424)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Buquet committed Mar 29, 2023
1 parent 571deb8 commit 149a217
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ import GBDeviceInfo

extension RoomInputToolbarView {
open override func sendCurrentMessage() {
// Triggers auto-correct if needed.
if self.isFirstResponder {
// Triggers auto-correct if needed and if it is not a command.
let isCommand = self.textMessage.hasPrefix("/")
if self.isFirstResponder && !isCommand {
let temp = UITextField(frame: .zero)
temp.isHidden = true
self.addSubview(temp)
Expand Down
1 change: 1 addition & 0 deletions changelog.d/7424.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Input command should not be auto-corrected

0 comments on commit 149a217

Please sign in to comment.