Skip to content

Inserting Tab into TextView when WordWrap & TabKeyAddsTab Exhibits Odd Behavior and Crashes #4725

@YourRobotOverlord

Description

@YourRobotOverlord

Pressing the Tab key in a TextView when both WordWrap and TabKeyAddsTab are set to true causes the app to crash.

To Reproduce

Steps to reproduce the behavior:

  1. Run UICatalog => Text Input Controls scenario.
  2. Check "Word Wrap" and "Tab Key Adds Tab"

Behavior 1:

  • Press 'Ctrl+End', 'Enter', 'Tab'
  • Immediate crash.

Behavior 2:

  • Press 'Ctrl+End', 'Tab', 'Right', 'Right'
  • Cursor moves one column at a time as if there are spaces.
  • Pressing 'Backspace' or 'Delete' anywhere in these "spaces" causes immediate crash.

Image

Behavior 3:

  • Press 'Tab' in the middle of a line of text.
  • 4 spaces are inserted.
  • Pressing 'Delete' or 'Backspace' removes incorrect characters from the text.

Image

All functions work correctly if Word Wrap is false

OS Information

This repros on Windows and Linux.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions