Skip to content

Fix: Prevent floating local video being dragged offscreen in VideoGallery#1725

Merged
JamesBurnside merged 4 commits intomainfrom
jaburnsi/fix-modal-going-offscreen
Mar 30, 2022
Merged

Fix: Prevent floating local video being dragged offscreen in VideoGallery#1725
JamesBurnside merged 4 commits intomainfrom
jaburnsi/fix-modal-going-offscreen

Conversation

@JamesBurnside
Copy link
Copy Markdown
Member

What

Fix floating local video tile going offscreen in VideoGallery:

outbounds.mp4

Why

The issue is because fluent assumes the modal is in the center of the screen when it calculates the bounds, more info: microsoft/fluentui#20122

How Tested

inbounds.mp4

Further bug needing solved

If you resize the screen the bounds need recalculated (not a regression from this PR, just another bug)

@JamesBurnside JamesBurnside changed the title Fix floating local video tile going offscreen in VideoGallery Fix: Prevent floating local video being dragged offscreen in VideoGallery Mar 25, 2022
@github-actions
Copy link
Copy Markdown
Contributor

@github-actions
Copy link
Copy Markdown
Contributor

Failed to pass the UI Test. If this PR is for UI change and the error is snapshot mismatch, please add "ui change" label to the PR for updating the snapshot.

@github-actions
Copy link
Copy Markdown
Contributor

internalState.minPosition = { x: -modalRectangle.left, y: -modalRectangle.top };
internalState.maxPosition = { x: modalRectangle.left, y: modalRectangle.top };
internalState.minPosition = minDragPosition ?? { x: -modalRectangle.left, y: -modalRectangle.top };
internalState.maxPosition = maxDragPosition ?? { x: modalRectangle.left, y: modalRectangle.top };
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice.

@JamesBurnside JamesBurnside enabled auto-merge (squash) March 30, 2022 15:53
@github-actions
Copy link
Copy Markdown
Contributor

@JamesBurnside JamesBurnside merged commit ddd6b1e into main Mar 30, 2022
@JamesBurnside JamesBurnside deleted the jaburnsi/fix-modal-going-offscreen branch March 30, 2022 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants