[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;
|
background-size: cover;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
pointer-events: all;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tl-image-container,
|
.tl-image-container,
|
||||||
.tl-video-container,
|
|
||||||
.tl-embed-container {
|
.tl-embed-container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
pointer-events: all;
|
pointer-events: all;
|
||||||
/* background-color: var(--color-background); */
|
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
|
@ -161,6 +161,12 @@ const TLVideoUtilComponent = track(function TLVideoUtilComponent(props: {
|
||||||
if (isLoaded && !isEditing && time !== video.currentTime) {
|
if (isLoaded && !isEditing && time !== video.currentTime) {
|
||||||
video.currentTime = time
|
video.currentTime = time
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isEditing) {
|
||||||
|
if (document.activeElement !== video) {
|
||||||
|
video.focus()
|
||||||
|
}
|
||||||
|
}
|
||||||
}, [isEditing, isLoaded, time])
|
}, [isEditing, isLoaded, time])
|
||||||
|
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue