Skip to content

BL-15721 show bubbles on top of videos#7597

Draft
nabalone wants to merge 1 commit intoVersion6.3from
BL-15721_put_bubbles_above_videos
Draft

BL-15721 show bubbles on top of videos#7597
nabalone wants to merge 1 commit intoVersion6.3from
BL-15721_put_bubbles_above_videos

Conversation

@nabalone
Copy link
Contributor

@nabalone nabalone commented Jan 20, 2026

This change is Reviewable


Open with Devin

@nabalone
Copy link
Contributor Author

Feels dangerous enough to me that maybe it should target 6.4 instead? What do you think?

}

// Detector above the canvas so we can detect hover and clicks of playback controls
.bloom-videoMouseDetector {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know what to call this. "videoInteractionDetector"? "videoMouseEventDetector"? If we decide not to preserve hover detection (see below) then we could call it "videoClickDetector"

&.bloom-videoReplayIcon {
display: flex;
.bloom-videoContainer.playing {
.bloom-videoMouseDetector:hover {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks like we decided not to do hover behavior in BloomPlayer (e.g. BloomBooks/bloom-player@c31f0fc) but kept it in BloomDesktop. Do we still want this?

.filter(
(_, x) =>
!x.classList.contains("bloom-videoControlContainer"),
!x.classList.contains("bloom-videoControlContainer") &&
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure what's going on here, we have a "Not sure about keeping this" comment above, but now there's no point in keeping a bloom-videoControlContainer without a bloom-videoMouseDetector, it won't work

@andrew-polk andrew-polk marked this pull request as draft January 22, 2026 23:56
@andrew-polk
Copy link
Contributor

Please retarget to master

Copy link

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

Open in Devin Review

Choose a reason for hiding this comment

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

🔴 handleVideoClick uses ev.currentTarget as HTMLVideoElement but it's now a div, breaking play/pause toggle

In Game Play mode, clicking anywhere on a video should toggle between play and pause. After this PR, handleVideoClick is attached to the mouseDetector div (line 37) instead of the videoElement. However, the handler at line 393 still casts ev.currentTarget as HTMLVideoElement, which is now a div element.

Root Cause and Impact

On line 393, const video = ev.currentTarget as HTMLVideoElement now gets the mouseDetector div, not the actual <video> element. On line 405, video.paused is checked — but a div element has no .paused property, so it evaluates to undefined (falsy). This means the else branch always executes, calling handlePauseClick(ev) regardless of whether the video is actually playing or paused.

Consequence: In Game Play mode (.drag-activity-play), clicking on a paused video will call handlePauseClick instead of handlePlayClick, so the video can never be resumed by clicking on it. The toggle behavior is completely broken — only pause works, never play.

Note that handlePlayClick and handlePauseClick themselves use ev.target (not ev.currentTarget) and navigate via .closest(".bloom-videoContainer"), so they would correctly find the video element. The bug is specifically in the dispatch logic of handleVideoClick.

(Refers to lines 392-409)

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

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