File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ export function handleFieldKeyDown(e: Event): void {
5252 element instanceof Element && element . tagName === "BUTTON"
5353 )
5454 ) {
55+ // custom space handling when a button is involved
5556 handleKeyDownOnButton ( event ) ;
5657 }
5758 if ( fieldType === FieldDataType . NUMBER ) {
@@ -63,11 +64,12 @@ export function handleFieldKeyDown(e: Event): void {
6364
6465// spaces do not work inside a button content-editable
6566// this adds a space and moves the cursor ahead, the
66- // button press event is also prevented
67+ // button press event is also prevented, finally syncs the field
6768function handleKeyDownOnButton ( e : KeyboardEvent ) {
6869 if ( e . code === "Space" && e . target ) {
6970 e . preventDefault ( ) ;
7071 insertSpaceAtCursor ( e . target as HTMLElement ) ;
72+ throttledFieldSync ( ) ;
7173 }
7274}
7375
You can’t perform that action at this time.
0 commit comments