rose icon indicating copy to clipboard operation
rose copied to clipboard

edit: Keystrokes ignored when editing python_list items

Open oliver-sanders opened this issue 7 years ago • 2 comments

Bug

Error occurs when a string outgrows its entry causing the box to expand. During this process it appears that only one keystroke may be registered.

Appears to pertain only to the python_list data type.

Occurs in normal typing, is especially evident when typing quickly and when pasting text.

Steps to reproduce:

rose-app.conf

[env]
VAR = ["some longish string", "b", "c"]

meta/rose-meta.conf

[env=VAR]
type = python_list

In rose edit, edit the first item of the list by copying the text then pasting a few times until the entry is forced to grow.

oliver-sanders avatar Jul 13 '17 15:07 oliver-sanders

(From https://github.com/astroDimitrios/rose/issues/32)

This is an issue that afflicts the rose edit 2019 as well as the rose edit python 3 version. Typing in the text box of a python list widget is really laggy, and often misses typed characters.

I suspect this is because it is reparsing the python list on every keypress, where is should really wait until the focus leaves the text box to do that, or at least have some kind of debouncing timeout. Fixing this would also help lessen the impact of https://github.com/metomi/rose/issues/2812.

I suspect this is a Rose 2019 issue so not really one for the porting project. Should be relatively easy to jam in a debounce (something along the lines of https://stackoverflow.com/a/78227581). - Oliver

jfrost-mo avatar Sep 24 '24 10:09 jfrost-mo

(the debounce suggestion is a good idea that might have application elsewhere too)

oliver-sanders avatar Sep 24 '24 10:09 oliver-sanders