Alejandro Toledo 5 years ago
parent
commit
59356291d4

+ 9 - 0
inspector/src/components/actionTabs/tabs/propertyGrids/animations/graphActionsBar.tsx

@@ -58,6 +58,13 @@ export class GraphActionsBar extends React.Component<IGraphActionsBarProps> {
     }
     }
   }
   }
 
 
+  onBlur(event: React.FocusEvent<HTMLInputElement>) {
+    event.preventDefault();
+    if (event.target.value !== '') {
+      this.props.setKeyframeValue();
+    }
+  }
+
   render() {
   render() {
     return (
     return (
       <div className='actions-wrapper'>
       <div className='actions-wrapper'>
@@ -77,6 +84,7 @@ export class GraphActionsBar extends React.Component<IGraphActionsBarProps> {
               value={this.props.actionableKeyframe.frame?.toString() || ''}
               value={this.props.actionableKeyframe.frame?.toString() || ''}
               step='1'
               step='1'
               disabled={this.props.actionableKeyframe.frame === undefined}
               disabled={this.props.actionableKeyframe.frame === undefined}
+              onBlur={(e) => this.onBlur(e)}
             />
             />
           </div>
           </div>
           <div className='action-input'>
           <div className='action-input'>
@@ -87,6 +95,7 @@ export class GraphActionsBar extends React.Component<IGraphActionsBarProps> {
               onChange={this.props.handleValueChange}
               onChange={this.props.handleValueChange}
               step='0.01'
               step='0.01'
               disabled={this.props.actionableKeyframe.value === undefined}
               disabled={this.props.actionableKeyframe.value === undefined}
+              onBlur={(e) => this.onBlur(e)}
             />
             />
           </div>
           </div>
           <IconButtonLineComponent
           <IconButtonLineComponent