fix(useFullscreen): isFullscreen
handling for mutliple fullscreen elements
#3000
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.
…e levels of full screen
Before submitting the PR, please make sure you do the following
fixes #123
).Description
solved #2962.
When assigning
true
toisFullscreen
, there is no check for situations where it is not the current element.Additional context
🤖 Generated by Copilot at ad7b77c
Enhance
useFullscreen
with new features and bug fix. AddfullscreenElement
to get the current fullscreen element andisCurrentElementFullScreen
to check if the target element is in fullscreen mode. Fixtoggle
bug when another element enters fullscreen mode.🤖 Generated by Copilot at ad7b77c
fullscreenElement
touseFullscreen
that returns the document property for the current fullscreen element (link)isCurrentElementFullScreen
touseFullscreen
that checks if the target element is the same as the current fullscreen element (link)handlerCallback
function intoggle
to only update theisFullscreen
reactive value if the target element is not in fullscreen mode or is the current fullscreen element (link)