Skip to content

Conversation

@piotr-iohk
Copy link
Collaborator

Description

Fix to hide keyboard on submit in TextEditor, see: #216.

Linked Issues/Tasks

Closes #216.

Screenshot / Video

Simulator.Screen.Recording.-.iPhone.17.-.2025-11-11.at.18.49.11.mov

@piotr-iohk piotr-iohk requested a review from Copilot November 11, 2025 18:05
@piotr-iohk piotr-iohk self-assigned this Nov 11, 2025
Copilot finished reviewing on behalf of piotr-iohk November 11, 2025 18:07
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes keyboard dismissal behavior in TextEditor components by implementing a custom view modifier that dismisses the keyboard when the user presses the return key. The solution detects newline characters and automatically removes them while dismissing the keyboard.

Key changes:

  • Created a reusable dismissKeyboardOnReturn view modifier
  • Applied the modifier to two TextEditor instances with accessibility improvements
  • Replaced manual .onSubmit handling with the new standardized approach

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
TextEditor+DismissOnReturn.swift New extension file containing the keyboard dismissal modifier implementation
SendEnterManuallyView.swift Applied the new modifier and added accessibility support
ReceiveEdit.swift Replaced .onSubmit with the new modifier and added accessibility support

@jvsena42 jvsena42 merged commit 71c151e into master Nov 12, 2025
11 checks passed
@jvsena42 jvsena42 deleted the fix/text-editor-not-hiding branch November 12, 2025 12:31
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.

TextEditor does not close keyboard on submit (which covers AddTags button)

3 participants