[fix] editing video shapes (#1821)
This PR fixes editing video shapes. The controls are now interactive again. ### Change Type - [x] `patch` — Bug fix ### Test Plan 1. Create a video shape. 2. Double click to edit the shape. 3. Use the controls to pause, change time, etc. ### Release Notes - Fix bug with editing video shapes.
This commit is contained in:
parent
af573bac51
commit
57b2cf6955
2 changed files with 7 additions and 3 deletions
|
@ -554,16 +554,14 @@ input,
|
|||
background-size: cover;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
pointer-events: all;
|
||||
}
|
||||
|
||||
.tl-image-container,
|
||||
.tl-video-container,
|
||||
.tl-embed-container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
pointer-events: all;
|
||||
/* background-color: var(--color-background); */
|
||||
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
|
|
@ -161,6 +161,12 @@ const TLVideoUtilComponent = track(function TLVideoUtilComponent(props: {
|
|||
if (isLoaded && !isEditing && time !== video.currentTime) {
|
||||
video.currentTime = time
|
||||
}
|
||||
|
||||
if (isEditing) {
|
||||
if (document.activeElement !== video) {
|
||||
video.focus()
|
||||
}
|
||||
}
|
||||
}, [isEditing, isLoaded, time])
|
||||
|
||||
React.useEffect(() => {
|
||||
|
|
Loading…
Reference in a new issue