Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Conversation

@keegangeorge
Copy link
Member

@keegangeorge keegangeorge commented May 26, 2025

🔍 Overview

When you have a post with audio being played and you open and close the AI post helper menu, it re-renders the entire post DOM, causing the audio to be interrupted and stop playing.

The reason for this is because we highlight the selected text when opening the AI post helper menu and we replace the entire post back with the original post HTML when closing the menu. This fix ensures that we do not re-render the entire post DOM and instead only remove the highlighted section that was added.

🔗 Context

https://meta.discourse.org/t/ai-helper-interrupting-uploaded-mp3-audio-stream/366817?u=keegan

📹 Screen Recording

Screen.Recording.2025-05-26.at.07.42.34.mov

Screen recording doesn't have audio, but you can see the progress bar for the audio continues playing and the showing/hiding of the highlighted text works correctly

@keegangeorge keegangeorge changed the title FIX: Closing AI menu stops post audio from playing FIX: Closing AI post helper menu interrupts post audio May 26, 2025
@keegangeorge keegangeorge merged commit e264572 into main May 26, 2025
6 checks passed
@keegangeorge keegangeorge deleted the fix-audio-break branch May 26, 2025 17:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants