mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-12-02 22:14:50 +00:00
fix(webui): clicking an inactive compare pane only activates it
Previously clicking a non-active video pane both switched the active version and toggled playback. Now a click on an inactive pane only makes it active; play/pause is only toggled when clicking the already-active pane.
This commit is contained in:
@@ -407,9 +407,13 @@ export const CompareVideoPane = forwardRef<ComparePaneHandle, CompareVideoPanePr
|
|||||||
|
|
||||||
const handleAreaClick = useCallback(() => {
|
const handleAreaClick = useCallback(() => {
|
||||||
if (useAnnotationStore.getState().isDrawing) return
|
if (useAnnotationStore.getState().isDrawing) return
|
||||||
onActivate?.()
|
// Clicking an inactive pane only activates it; playback is untouched.
|
||||||
|
if (!isActive) {
|
||||||
|
onActivate?.()
|
||||||
|
return
|
||||||
|
}
|
||||||
onRequestTogglePlay?.()
|
onRequestTogglePlay?.()
|
||||||
}, [onActivate, onRequestTogglePlay])
|
}, [isActive, onActivate, onRequestTogglePlay])
|
||||||
|
|
||||||
if (!file.media?.original?.downloadUrl || !metadata) {
|
if (!file.media?.original?.downloadUrl || !metadata) {
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user