surge-synthesizer / surge

Synthesizer plug-in (previously released as Vember Audio Surge)
https://surge-synthesizer.github.io/
GNU General Public License v3.0
3.08k stars 394 forks source link

Keyboard is not focused to value input when editing modulation values from context menu #5758

Open xard-dev opened 2 years ago

xard-dev commented 2 years ago

Bug Description: Keyboard is not focused to value input when editing modulation values from context menu and the field needs to be clicked before a value can be written.

Surge Version:

Reproduction Steps:

  1. Open control like Filter cutoff context menu
  2. Click on any modulation edit icons OR click Add modulation from context menu item adding a new modulation target
  3. Type value

Expected Behavior: A value can be inserted directly.

Screenshots: image

Computer Information (please complete the following information):

Additional Information: When opening context menu for a control and choosing Edit value the keyboard focus is in the popup field and the value can be inserted directly.

baconpaul commented 2 years ago

OK this isn't a problem on mac but i happen to be in linux now so let me look

baconpaul commented 2 years ago

oh and confirmed that on linux it does happen. and it is annoying.

baconpaul commented 2 years ago

hmm i have no idea how to fix this it's super annoying but i don't think i would block on it. I thought it might be our custom focus handlers but it isn't.

Oh @xard-dev I'm also interested if that , as . works properly with the parsing?

xard-dev commented 2 years ago

For my regional settings decimal separator comma , works as expected but period . is ignored and the values after period are discarded.

xard-dev commented 2 years ago

And If I temporarily change to LC_ALL=C the period . is used instead of comma , as expected.

baconpaul commented 2 years ago

great thanks!

j5v commented 2 years ago

I came here to report this bug. What might help: While the 'edit value' box is being displayed, I can right-click again and again select the edit icon in the context menu. If I can get the value to focus, then repeated attempts will always be in focus. However, if the 'edit value' box is not focused, then it might, or might not focus next time. I suspect a race condition between display and focus.

baconpaul commented 2 years ago

Yeah it’s all single threaded but I wonder if I need a show message to get a cycle before the focus message. Excellent observation