Skip to content

Add support for "Look Up" action in text selection menu #55

Description

@samanthakoski

Description

When using .textual.textSelection(.enabled), Textual provides native text selection with copy/share actions. However, it does not appear to expose a way to include the system “Look Up” action (the iOS dictionary/definition feature) in the selection menu.

Checklist

  • I have determined whether this bug is also reproducible in a vanilla SwiftUI project.
  • If possible, I've reproduced the issue using the main branch of this package.
  • This issue hasn't been addressed in an existing GitHub issue or discussion.

Expected behavior

  • The selection menu should include “Look Up” when appropriate
  • Or, Textual should provide an API to:
    • opt into system-provided actions like Look Up
    • or inject custom menu actions into the selection menu

Actual behavior

  • Text selection works correctly with .textual.textSelection(.enabled)
  • Copy / share actions are available
  • No visible way to access or enable the “Look Up” action

Steps to reproduce

  1. Select text
  2. Menu only contains Copy and Share

Textual version information

0.3.1

Destination operating system

iOS 18+

Xcode version information

26.2

Swift Compiler version information

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions