File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
apps/builder/app/builder/features/style-panel/sections/shared Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ const Input = ({
7676 batch . setProperty ( property ) ( styleValue ) ;
7777 batch . publish ( { isEphemeral : true } ) ;
7878 } }
79- onChangeComplete = { ( { value, type , altKey, shiftKey } ) => {
79+ onChangeComplete = { ( { value, altKey, shiftKey } ) => {
8080 const batch = createBatchUpdate ( ) ;
8181 const modifiers = { shiftKey, altKey } ;
8282 const properties = isSpace ( property )
@@ -86,10 +86,8 @@ const Input = ({
8686 for ( const property of properties ) {
8787 batch . setProperty ( property ) ( value ) ;
8888 }
89- batch . publish ( { isEphemeral : false } ) ;
90- if ( type === "blur" || type === "enter" ) {
91- onClosePopover ( ) ;
92- }
89+ batch . publish ( ) ;
90+ onClosePopover ( ) ;
9391 } }
9492 onAbort = { ( ) => {
9593 const batch = createBatchUpdate ( ) ;
@@ -142,7 +140,13 @@ export const InputPopover = ({
142140 < PopoverTrigger asChild >
143141 < Trigger />
144142 </ PopoverTrigger >
145- < PopoverContentStyled hideArrow sideOffset = { - 24 } >
143+ < PopoverContentStyled
144+ hideArrow
145+ sideOffset = { - 24 }
146+ // prevent propagating click on input or combobox menu
147+ // and closing popover before applying changes
148+ onClick = { ( event ) => event . stopPropagation ( ) }
149+ >
146150 < Input
147151 styleSource = { styleSource }
148152 value = { value }
You can’t perform that action at this time.
0 commit comments