puck icon indicating copy to clipboard operation
puck copied to clipboard

Cannot type polish letter "ż" in text fields

Open lg-hued opened this issue 4 months ago • 1 comments

Description

When trying to type polish letter ż (Alt Gr + Z) in text field, it undoes the last action instead (like Ctrl + Z hotkey)

Environment

  • Puck version: 0.19.0, 0.20.1
  • Browser version: Edge 139 (desktop), Firefox Developer 143 (desktop)
  • Additional environment info: Windows with keyboard Polish (Programmers)

Steps to reproduce

  1. Set Windows keyboard to Polish (Programmers)
  2. Create any component with field of type text
  3. Add the component to preview
  4. Type letter ż (Alt Gr + Z or Right Alt + Z)

What happens

The undo action is triggered and component disappear

What I expect to happen

Letter ż appears in text field

Additional Media

Logs after adding document.addEventListener('keydown', console.log) and pressing just Alt Gr:

KeyboardEvent {isTrusted: true, key: 'Control', code: 'ControlLeft', location: 1, ctrlKey: true, …}
isTrusted: true
altKey: false
bubbles: true
cancelBubble: false
cancelable: true
charCode: 0
code: "ControlLeft"
composed: true
ctrlKey: true
currentTarget: null
defaultPrevented: false
detail: 0
eventPhase: 0
isComposing: false
key: "Control"
keyCode: 17
location: 1
metaKey: false
repeat: false
returnValue: true
shiftKey: false
sourceCapabilities: InputDeviceCapabilities {firesTouchEvents: false}
srcElement: body
target: body
timeStamp: 16245
type: "keydown"
view: Window {0: Window, window: Window, self: Window, document: document, name: '', location: Location, …}
which: 17
[[Prototype]]: KeyboardEvent
KeyboardEvent {isTrusted: true, key: 'AltGraph', code: 'AltRight', location: 2, ctrlKey: false, …}
isTrusted: true
altKey: false
bubbles: true
cancelBubble: false
cancelable: true
charCode: 0
code: "AltRight"
composed: true
ctrlKey: false
currentTarget: null
defaultPrevented: false
detail: 0
eventPhase: 0
isComposing: false
key: "AltGraph"
keyCode: 18
location: 2
metaKey: false
repeat: false
returnValue: true
shiftKey: false
sourceCapabilities: InputDeviceCapabilities {firesTouchEvents: false}
srcElement: body
target: body
timeStamp: 16245.5
type: "keydown"
view: Window {0: Window, window: Window, self: Window, document: document, name: '', location: Location, …}
which: 18
[[Prototype]]: KeyboardEvent

lg-hued avatar Aug 26 '25 09:08 lg-hued

I can replicate this as well!

For the record, this happens when you edit the field using the sidebar fields.
If you use inline editing (in 0.20.x), then it doesn't trigger the undo action.

FedericoBonel avatar Aug 26 '25 11:08 FedericoBonel