-
Notifications
You must be signed in to change notification settings - Fork 5
[Bug]: Block Toolbar persists when selected block moves out of view in carousel #106
Description
Describe the bug
When working with a carousel containing multiple slides in the editor, selecting a block inside a slide correctly activates the block toolbar. However, when navigating between slides using the carousel controls (e.g., arrow buttons), the previously selected block may move out of the visible viewport along with its slide.
Despite this, the block toolbar remains visible and continues to float, even though the associated block is no longer in view. Additionally, the toolbar may shift position as the carousel is interacted with, which may not be optimal.
This state persists until the user manually selects another block, at which point the toolbar updates correctly.
bug.mov
Expected behavior
- When a slide moves out of the visible viewport, any block selection within that slide should be cleared.
- The block toolbar should not persist for blocks that are no longer visible.
Actual behavior
- The selected block remains active even after its slide moves out of the visible viewport
- The block toolbar continues to persist and float on the screen
- The toolbar may shift position as the carousel is navigated
- The toolbar remains visible until a different block is manually selected
Steps to reproduce
- Create a carousel with multiple slides.
- Add a paragraph block to one of the middle slides.
- Select the paragraph to activate the block toolbar.
- Navigate to a different slide using the carousel arrow controls.
- Observe that the block toolbar remains visible even though the selected block is no longer in view.
Environment information
OS: macOS Tahoe
Browser: Tested on Chrome, Firefox, Safari
Plugin version: latest develop
WordPress Environment
WordPress version: 6.9.4
PHP Version: 8.5
Active Theme: TT5
Active Plugin: N/A
Contribution Guidelines
- I have read the contribution guidelines