Skip to content

fix: video player controls buttons shift position in fullscreen on mobile.#1725

Open
Asteriskkkk wants to merge 1 commit intortCamp:developfrom
Asteriskkkk:fix/mobile-fullscreen-player-controls-shift
Open

fix: video player controls buttons shift position in fullscreen on mobile.#1725
Asteriskkkk wants to merge 1 commit intortCamp:developfrom
Asteriskkkk:fix/mobile-fullscreen-player-controls-shift

Conversation

@Asteriskkkk
Copy link
Copy Markdown

@Asteriskkkk Asteriskkkk commented Mar 13, 2026

Fixes: #1527.

In mobile view, when a video has engagement options enabled and the comment box is open, the player controls (pause and seek/forward) change position unexpectedly when entering fullscreen.

Before After
image-before image-after

Copilot AI review requested due to automatic review settings March 13, 2026 13:57
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes a mobile fullscreen UI regression where skip/pause controls shift position when opening the engagement comment modal, by forcing a layout recalculation after the player DOM is moved into the modal.

Changes:

  • Dispatches a resize event after moving the video wrapper into the comment modal to re-run control positioning logic on mobile.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread assets/src/js/godam-player/engagement.js
Comment thread assets/src/js/godam-player/engagement.js
Comment thread assets/src/js/godam-player/engagement.js Outdated
@Asteriskkkk Asteriskkkk force-pushed the fix/mobile-fullscreen-player-controls-shift branch from 177708a to bf7ca1c Compare March 13, 2026 14:30
@Asteriskkkk Asteriskkkk requested a review from Copilot March 13, 2026 14:32
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes a mobile fullscreen UI regression where the central controls (play/skip) shift position when the engagement comment modal is open by forcing a post-move resize so the control layout recalculates against the modal’s dimensions.

Changes:

  • After moving the current player DOM into the comment modal, trigger a resize to reflow skip/control positioning.
  • Prefer triggering a scoped Video.js resize on the player instance, with a fallback to dispatching a global window resize.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread assets/src/js/godam-player/engagement.js Outdated
Comment thread assets/src/js/godam-player/engagement.js Outdated
@Asteriskkkk Asteriskkkk force-pushed the fix/mobile-fullscreen-player-controls-shift branch from bf7ca1c to d3e1235 Compare March 13, 2026 14:38
@Asteriskkkk Asteriskkkk requested a review from Copilot March 13, 2026 14:39
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes a mobile fullscreen UI issue in the GoDAM player where control buttons (pause/seek/skip) shift unexpectedly when engagement features are enabled and the comment box modal is open.

Changes:

  • After moving the active video DOM into the comment modal container, triggers a resize to force Video.js/control layout recalculation.
  • Prefers triggering a scoped resize event on the Video.js player instance, with a fallback to dispatching a global window resize.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread assets/src/js/godam-player/engagement.js Outdated
Comment thread assets/src/js/godam-player/engagement.js Outdated
@Asteriskkkk Asteriskkkk force-pushed the fix/mobile-fullscreen-player-controls-shift branch from d3e1235 to 6c56792 Compare March 13, 2026 14:59
@Asteriskkkk Asteriskkkk requested a review from Copilot March 13, 2026 15:02
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes a mobile fullscreen layout issue where central player controls (pause/seek/skip) shift position when engagement/comment modal is open by forcing a post-move resize recalculation after the video DOM is moved into the modal container.

Changes:

  • After appending the current video into the comment modal container, triggers a Video.js resize event when possible.
  • Adds a fallback path that dispatches a global window resize event if a player instance can’t be resolved.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread assets/src/js/godam-player/engagement.js Outdated
@Asteriskkkk Asteriskkkk force-pushed the fix/mobile-fullscreen-player-controls-shift branch from 6c56792 to 64db5da Compare March 13, 2026 15:17
@Asteriskkkk Asteriskkkk requested a review from Copilot March 13, 2026 16:27
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes a mobile fullscreen layout issue where skip/seek controls shift position after opening the engagement comment modal by forcing a player/layout resize once the video DOM is moved into the modal container.

Changes:

  • After moving the current video into the comment modal container, attempt to trigger a Video.js resize event.
  • Add a fallback to dispatch a global window resize event if the Video.js call errors.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +1205 to +1214
try {
const player = window.videojs.getPlayer( videoElement );
if ( player && typeof player.trigger === 'function' ) {
player.trigger( 'resize' );
}
} catch ( error ) {
// fall back to dispatching a global window resize event.
window.dispatchEvent( new Event( 'resize' ) );
}

// fall back to dispatching a global window resize event.
window.dispatchEvent( new Event( 'resize' ) );
}

…n fullscreen on mobile.

In mobile view, when a video has engagement options enabled
and the comment box is open, the player controls (pause and seek/forward)
change position unexpectedly when entering fullscreen.
@Asteriskkkk Asteriskkkk force-pushed the fix/mobile-fullscreen-player-controls-shift branch from 64db5da to b2331da Compare March 13, 2026 17:23
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.

2 participants