-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: correct the offset of the mirror #455
base: main
Are you sure you want to change the base?
Conversation
48bd9c9
to
ecdb715
Compare
@@ -426,7 +474,7 @@ function resetMirror({mirror, source, options, ...args}) { | |||
offsetWidth = computedSourceStyles.getPropertyValue('width'); | |||
} | |||
|
|||
mirror.style.display = null; | |||
mirror.style.display = ''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A style declaration is reset by setting it to
null
or an empty string, e.g.,elt.style.color = null
. Internet Explorer requires setting it to an empty string, and does not do anything when setting it tonull
.
if ( | ||
(containerStyle.transform && containerStyle.transform !== 'none') || | ||
(containerStyle.perspective && containerStyle.perspective !== 'none') || | ||
(containerStyle.filter && containerStyle.filter !== 'none') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(containerStyle.backdropFilter && containerStyle.backdropFilter !== 'none')
This PR implements or fixes... (explain your changes)
Fix the offset of the mirror and the set value for the mirror
display
.Reproduction: https://codepen.io/1010543618/pen/PozRmve
See:
This PR closes the following issues... (if applicable)
#139
Does this PR require the Docs to be updated?
No
Does this PR require new tests?
Because the jsdom used by jest by default is not a real browser environment, it is difficult to write tests.
This branch been tested on... (click all that apply / add new items)
Browsers: