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

Fix issue where the toolbar can be hidden for the block after a wide aligned image #16530

Merged
merged 1 commit into from
Jul 11, 2019

Conversation

youknowriad
Copy link
Contributor

closes #16519

Testing instructions

  • Insert a full aligned image
  • Insert a paragraph after the image
  • The paragraph's toolbar should not be cropped.

@youknowriad youknowriad added the [Type] Bug An existing feature does not function as intended label Jul 11, 2019
@youknowriad youknowriad requested a review from ellatrix July 11, 2019 09:51
@youknowriad youknowriad self-assigned this Jul 11, 2019
Copy link
Member

@jorgefilipecosta jorgefilipecosta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was able to replicate the problem in master and it is solved on this branch.

ref.current.style.transform = `translate3d(${ newTransform.x }px,${ newTransform.y }px,0)`;
ref.current.style.transform = newTransform.x === 0 && newTransform.y === 0 ?
undefined :
`translate3d(${ newTransform.x }px,${ newTransform.y }px,0)`;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder why applying a translate3d with all coordinates as 0 causes this problem, it seems unexpected. Supposedly translate3d(0,0,0) is a common "hack" to force hardware acceleration and makes CSS transitions smoother, but I did not expect a visual impact.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I don't know it seems to mess up with z-index somehow.

@youknowriad youknowriad merged commit 6860857 into master Jul 11, 2019
@youknowriad youknowriad deleted the fix/z-index-issue-animation branch July 11, 2019 11:26
@youknowriad youknowriad added this to the Gutenberg 6.2 milestone Jul 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gutenberg - Transition [Transform] Bug on Reordering
2 participants