Skip to content
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

transform: scale elements within modals are not positioned correctly #206

Open
itayganor opened this issue Aug 16, 2018 · 0 comments
Open

Comments

@itayganor
Copy link

I have just noticed a weird bug I could replicate on JSFiddle.

I use a custom design for checkboxes, and my V icon is being animated from transform: scale(0) to transform: scale(1) on click. Nothing too crazy.

The problem starts when I place a checkbox within another element with
a transform property. I use iziModal library in my example to demonstrate it.

Open the results page on full screen and try following these steps in order to see the exact issue:

  1. Trigger the modal. nothing seems to be wrong with the checkboxes.
  2. Toggle the scrollbar of the modal (with the radio buttons below). this will make #modal-content really high.
  3. Trigger the modal. you can now see the V icon is not at its correct position during the transition.
  4. Now apply -webkit-backface-visibility: hidden; with the second radio button group.
  5. Trigger the modal. you can now see that the checkboxes themselves are offsetted during the transition.

Notes:

  • -webkit-backface-visibility: hidden; on other elements than input[type=checkbox] doesn't seem to change anything.
  • the problem happens only when body is direction: rtl;.

also posted on StackOverflow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant