vaadin / copilot

0 stars 0 forks source link

Inline editing explodes unless you close the editor with [esc] #3

Closed Legioth closed 7 months ago

Legioth commented 7 months ago

Seems like the inline editor is properly removed only if it's discarded using the [esc] key.

Steps to reproduce:

  1. Double click a text to enable the inline editor
  2. Type in a new text
  3. Press [enter] (or click outside the input field). Observe that the code has been updated appropriately but the input remains visible.
  4. Press [enter] again or click anywhere. Observe that the input disappears but the regular text is still not visible. The JS console contains errors about Unable to set text Error: Unable to find text node containing '' and Uncaught TypeError: Cannot read properties of null (reading 'focus')
Artur- commented 7 months ago

Need some more instructions on how to reproduce this as it works in some/most cases

https://github.com/vaadin/copilot/assets/260340/442450d1-07ce-42b9-81df-60d297f3f541

Legioth commented 7 months ago

I might have been testing with some other version: https://github.com/vaadin/copilot/issues/1#issuecomment-1857838775

Legioth commented 7 months ago
% npx @hilla/cli init my-hilla-app
% cd my-hilla-app
% grep hilla.version pom.xml | head -n1
        <hilla.version>2.5.1</hilla.version>
% mvn 

The final seconds in the recording when the text returns is after a page reload.

https://github.com/vaadin/copilot/assets/1294657/d30ccff7-b3b3-457a-9009-07a9378840bf

Artur- commented 7 months ago

I see, this is a problem with the built version only where Vite events are not delivered