Added is-focus-mode
class on all viewports.
#67377
Merged
+2
−7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes: #67376
What?
This pull request addresses and resolves the issue where Spotlight Mode does not function as intended on mobile viewports. The fix ensures that the feature behaves consistently across all devices, aligning the mobile experience with the expected functionality seen on desktop. By implementing this solution, users will now observe the proper highlighting of the active block with reduced opacity for surrounding elements.
Why?
This fix is crucial as displaying the Spotlight Mode toggle on mobile viewports without any associated functionality can mislead users into believing the toggle is broken. To address this, two solutions were proposed in the issue description:
This PR adopts and enables the functionality of Spotlight Mode on mobile devices.
How?
gutenberg/packages/block-editor/src/components/block-list/index.js
Line 108 in b54d1fe
The code above previously prevented the is-focus-mode class from being applied to viewports with smaller widths, resulting in the observed bug. The additional viewport restrictions were removed to resolve this issue, ensuring consistent functionality across all viewport sizes.
Screencast
Screen.Recording.2024-11-28.at.2.53.19.PM.mov