mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-22 21:27:40 +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(() => {
|
||||
if (useAnnotationStore.getState().isDrawing) return
|
||||
onActivate?.()
|
||||
// Clicking an inactive pane only activates it; playback is untouched.
|
||||
if (!isActive) {
|
||||
onActivate?.()
|
||||
return
|
||||
}
|
||||
onRequestTogglePlay?.()
|
||||
}, [onActivate, onRequestTogglePlay])
|
||||
}, [isActive, onActivate, onRequestTogglePlay])
|
||||
|
||||
if (!file.media?.original?.downloadUrl || !metadata) {
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user