opencode icon indicating copy to clipboard operation
opencode copied to clipboard

Text input goes crazy on scroll

Open julionav opened this issue 1 year ago • 33 comments

Ummmm. Hard to explain, but If I scroll very fast with my MX Master 2S (you spin the wheel and it continues spinning), the input goes crazy with some weird input. If is do it without letting it spin on its own, in a controlled way, it doesnt happen.

https://github.com/user-attachments/assets/8153b8e5-d105-48c3-b1ce-3a5b273afa8f

julionav avatar Jun 19 '25 23:06 julionav

Update: only seems to happen on warp.dev -- vscode terminal works fine

julionav avatar Jun 20 '25 14:06 julionav

Same for me (also warp)

einarno avatar Jun 20 '25 14:06 einarno

btw this happens for me on ghostty

aashish2057 avatar Jun 20 '25 15:06 aashish2057

btw this happens for me on ghostty

@aashish2057

Fixed for me (on Ghostty) in 0.1.114

titan-graham avatar Jun 20 '25 21:06 titan-graham

still having the issue on 0.1.115

aashish2057 avatar Jun 20 '25 21:06 aashish2057

Happens for me with two-finger trackpad side-scrolling.

macOS OpenCode 0.1.117 Ghostty tmux

It inputs stuff like this:

;29M;143;29M[<67;143;29M29M143;29M[<67;143;29M9M43;29M67;143;29MM3;29
                                                                                  M7;143;29M;29M;150;29M[<66;150;29M29M150;29M[<66;150;29M9M50;29M66;15
                                                                                  0;29MM;41M;101;41M[<67;101;41M41M101;41M[<67;101;41M1M01;41M67;101;41
                                                                                  M

markjaquith avatar Jun 21 '25 04:06 markjaquith

so it looks like bubbletea emits keypress messages for some mouse wheel events on some setups (or maybe even specific to some mice). i'll let the charm team know, if anyone wants to do some spelunking upstream that'd be super helpful

adamdotdevin avatar Jun 23 '25 14:06 adamdotdevin

This bug also interrupts any currently-running agent processes

drj613 avatar Jun 23 '25 15:06 drj613

Same for me.

Image

thesobercoder avatar Jun 23 '25 19:06 thesobercoder

I can reliably recreate the issue on Kitty and Macs built in terminal.

It happens on any scroll, but it only happens if I "fast" scroll or "throw" the scroll. Not sure how to best describe it. Happens on touchpad and MX Master 3 "throw" scrolling.

https://github.com/user-attachments/assets/cf06d532-05e3-409c-9dd5-c0a25f211a7e

ahwelgemoed avatar Jun 25 '25 14:06 ahwelgemoed

Same here. Ghostty.

marijnbent avatar Jun 27 '25 21:06 marijnbent

Same for me with ghostty and mac terminal

mcappelloni avatar Jun 28 '25 13:06 mcappelloni

wanted everyone to know we are looking into this. it's an upstream bug in charm's bubbletea, and we hope to fix the issue there

adamdotdevin avatar Jun 28 '25 13:06 adamdotdevin

we have a patch for it in 0.1.160 - it's not perfect so let me know if you have issues still

thdxr avatar Jun 28 '25 16:06 thdxr

version 0.1.161 doesn't seem to have the same issues in ghostty.

mcappelloni avatar Jun 29 '25 00:06 mcappelloni

This is still happening on 0.1.176 when scrolling up and then, while the scrolling is happening, scrolling back down.

https://shots.schmatzler.com/DJ0kJhlw

On the latest Ghostty.

cschmatzler avatar Jul 02 '25 19:07 cschmatzler

what about v0.1.180

thdxr avatar Jul 03 '25 03:07 thdxr

Still an issue for me in v0.1.181 with iterm on mac

numisteinn avatar Jul 03 '25 08:07 numisteinn

Still happening, but the characters it appends to the input field are now just <

Image

cschmatzler avatar Jul 03 '25 11:07 cschmatzler

The above happened to me my very first time using opencode after the update that fixed it. Haven't had it trigger again though 🤷

0.1.165 on Mac

drj613 avatar Jul 03 '25 21:07 drj613