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 the html data is wrong in clipboard emulation in Playwright #40638

Merged
merged 1 commit into from
Apr 27, 2022

Conversation

kevin940726
Copy link
Member

What?

Object.prototype.hasOwnProperty.call(Element, 'outerHTML') will always returns false since outerHTML is not a ownProperty of the Element's instance.

Why?

Fix clipboard emulation gets the html data wrong in Playwright utils. A bug introduced back in #39807.

How?

This PR changes that to doing downcasting and ?? to follow the same logic in the original util.

Testing Instructions

Fortunately, no tests were affected by this bug. The tests should still pass.

@kevin940726 kevin940726 added the [Type] Bug An existing feature does not function as intended label Apr 27, 2022
Copy link
Contributor

@talldan talldan left a comment

Choose a reason for hiding this comment

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

👍

@kevin940726 kevin940726 merged commit d4766aa into trunk Apr 27, 2022
@kevin940726 kevin940726 deleted the fix/clipboard-selection-html branch April 27, 2022 07:48
@github-actions github-actions bot added this to the Gutenberg 13.2 milestone Apr 27, 2022
@georgeh georgeh added the [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. label May 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants