Text in EditText bounces up and down for every change
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 161
Description
## Bevy version and features
Latest `main` as at today just with default features.
## \[Optional\] Relevant system information
Windows 11.
SystemInfo { os: "Windows 11 Home", kernel: "26200", cpu: "AMD Ryzen 9 9900X3D 12-Core Processor", core_count: "12", memory: "61.6 GiB" }
AdapterInfo { name: "AMD Radeon RX 7600", vendor: 4098, device: 29824, device_type: DiscreteGpu, device_pci_bus_id: "", driver: "AMD proprietary driver", driver_info: "25.6.1 (LLPC)", backend: Vulkan, subgroup_min_size: 32, subgroup_max_size: 64, transient_saves_memory: Some(false), limit_bucket: None }
GPU clustering is supported on this device.
GPU preprocessing is fully supported on this device.
## What you did
Running the new `character_creation` example, with no extra features.
A window is opened of size 1600x900.
Edit the text in the Name field, or move the cursor within it using Left/Right/Home/End.
## What went wrong
The text being edited (initially "Bevy") bounces up and down with each edit or move.
## Additional information
It looks like `TextViewport::reveal_caret` is alternately setting `self.offset.y` to 0.0 or 1.0000019.
If the current value is 0.0, it takes one branch of the if-statement and sets it to 1.0000019.
If the current value is > 0.0, it takes a different branch and sets it back to 0.0.
The jumping up and down **does not** happen (and the `self.offset.y` is always 0.0) if I maximise the window to my monitor size 1920x1080.
Contributor guide
Research direction
Run the character_creation example at a 1600x900 window size and trace TextViewport::reveal_caret while editing the Name field or moving the cursor. Compare its behavior with the maximized 1920x1080 case; done means the text no longer bounces and the vertical offset does not alternate between 0.0 and 1.0000019.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100