eclipse-glsp / glsp

Graphical language server platform for building web-based diagram editors
https://www.eclipse.dev/glsp
Other
202 stars 33 forks source link

Select All, Undo, Redo not working in auto-complete and palette filter input #1390

Open planger opened 2 months ago

planger commented 2 months ago

Discussed in https://github.com/eclipse-glsp/glsp/discussions/1389

Originally posted by **vibsid0986** August 16, 2024 Hello Team, I was working on workflow-glsp examples and observed that when we double click on a node and Autocomplete widget opens, select all, undo and redo are not working in there, even their corresponding key bindings seems to select the complete workflow example widget instead of the text in the autocomplete widget. Please see below image when I did Ctrl + A on the node with text "ABC", it selects the complete widget. Request you to help me in resolving this issue, as I need to implement select all, undo, redo for my custom use case. Thanks in advance. ![image](https://github.com/user-attachments/assets/b50a89cb-8315-41bd-9db0-d759d99d647c)
tortmayr commented 2 months ago

Seems to be a Theia-integration specific problem. Works as expected in the standalone workflow example

vibsid0986 commented 1 month ago

Hi,

I am using@eclipse-glsp/theia-integration": "2.0.0" with theia version : 1.43.1.

is this issue related to the version specified or an implementation issue ??

vibsid0986 commented 1 month ago

Hi @planger ,

Can you please guide me as to how I can fix this issue.

Thanks in advance, Siddhant

planger commented 1 month ago

I didn't get to debugging this in detail, but it looks like those events are coming from Theia and are forwarded to the GLSP Theia integration, which then directly acts as if the diagram should handle those, when in fact some input field has focus and should handle those events.

I assume we need to check the GLSP Keybinding Context and only activate it if the diagram has focus, but not if an input field has focus.

This bug may have been introduced by a rather recent move of the UI extensions into the diagram container, but I'm not sure.