Skip to content

Multi glyph runs in text input could crash #36449

@wusyong

Description

@wusyong

Describe the bug:
Not sure why search bar from google.com and textarea doesn't have this bug.
But I found text input might crash in a subtle manner.
The caret is missing even after pressing a few times of right arrow.

To Reproduce:

  • Create a html file with following code and run with servoshell:
<input id="input_element" value="xxxxxxxxxxxxxxxxxxxx">
  • Focus text input and the press right arrow 1 time
  • type Bopomo "ㄎ"
  • It will crash with following log:
iter_glyphs_for_range: range.end beyond length! (thread Script(1,1), at \servo\components\fonts\glyph.rs:614)
[2025-04-10T16:16:25Z ERROR servoshell::panic_hook] iter_glyphs_for_range: range.end beyond length!

Platform:
Windows 11

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions