Skip to content

fix: LEAP-1442: Fix unexpected scrolling on region select in Video #7392

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Apr 24, 2025
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,8 @@ export const Frames: FC<TimelineViewProps> = ({
let baseFrame = toSteps(offset, step) + 1;
let isInstant = false;

setIndicatorOffset(offset);
// don't scroll if we select region clicking on keyframes, outside of scrollable area
if (onKeyframes) setIndicatorOffset(offset);

if (isDrawing) {
// always a timeline region
Expand Down
6 changes: 6 additions & 0 deletions web/libs/editor/src/regions/TimelineRegion.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ const Model = types
* @property {string[]} [value.timelinelabels] Regions are created by `TimelineLabels`, and the corresponding label is listed here.
*/

onSelectInOutliner() {
// skip video to the first frame of this region
// @todo hidden/disabled timespans?
self.object.setFrame(self.ranges[0].start);
},

/**
* @return {TimelineRegionResult}
*/
Expand Down
Loading