bubbles icon indicating copy to clipboard operation
bubbles copied to clipboard

textarea broken(ish) between 0.26.2 and 0.26.3

Open vttoonses opened this issue 2 years ago • 1 comments

Describe the bug When used in a sequence of inputs, the textarea control receives a number of KeyMsg and other messages which have two noticeable effects:

  1. Weird control character sequences appear as the control's input, and
  2. There is often a 5 to 30 second delay in the rendering of the control.

Note: the textarea sample application ("tell me a story") does not appear to show the same behavior.

Setup Please complete the following information along with version numbers, if applicable.

  • OS: macOS
  • Shell: zsh
  • Terminal Emulator: macOS Terminal application

To Reproduce Steps to reproduce the behavior:

  1. Clone wizard-tutorial
  2. Update the bubbletea version to 0.26.2 and go mod tidy to get new dependencies
  3. go run *.go and enter values for each input and ctrl+c to exit at the end
  4. Update the bubbletea version to 0.26.3 and go mod tidy to get new dependencies
  5. go run *.go and enter values for first two textinput fields
  6. When the textarea renders, see the "random" characters

Source Code wizard-tutorial

This project does not exhibit the same behavior textarea

Expected behavior The textarea control should render quickly and without the extra/random characters already populating the field.

Screenshots Expected behavior (0.26.2) - Screenshot 2024-06-20 at 12 25 44 PM

Current behavior (0.26.3) - Screenshot 2024-06-20 at 12 18 13 PM

Additional context

  • There is a significant pause between the second and third inputs.
  • I've posted my explorations and red herrings on the Charm Discord account here and here.

vttoonses avatar Jun 20 '24 16:06 vttoonses

Hey I've experienced huge lag spikes with text areas but only using the stock MacOS terminal emulator.
I'm still experimenting right now but it seems the culprit is Lipgloss, I've tried with an unstyled text area and had no lag.

ta := textarea.New()
ta.Placeholder = "Type something..."

zyriab avatar Sep 08 '25 12:09 zyriab