-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
🐛 fixed fields autocomplete not working in popup #17701
base: main
Are you sure you want to change the base?
Conversation
d6e1ccb
to
0ba9f94
Compare
0ba9f94
to
bad8fd5
Compare
@@ -38,7 +38,7 @@ export const GlobalStyles = ` | |||
|
|||
body { | |||
margin: 0px; |
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.
Note for whoever will review this PR.
When testing signin popup, I noticed some font and paragraph changes on the page: headings font looked smaller, and there was a bigger separation between paragraphs (only when popup is open). This was caused by styles injected in the popup which were previously isolated in the iframe and now are embed in the body. I fixed the visual glitch by adding Inter font and removing parragraph bottom margin from global styles, although I am not 100% sure this was the correct approach.
closes TryGhost#16960 - replaced iframe by div for signin page
bad8fd5
to
bdd1f52
Compare
@@ -291,14 +294,10 @@ export default class PopupModal extends React.Component { | |||
className += ' dev'; | |||
} | |||
|
|||
return ( | |||
<div style={Styles.modalContainer}> | |||
<Frame style={frameStyle} title="portal-popup" head={this.renderFrameStyles()} dataTestId='portal-popup-frame'> |
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.
I think iframe is used here to have a style encapsulation. Putting content directly to document may cause some styling issues in some templates. There are many 3rd party templates using portals for signin and their global style definitions can reach this login popup.
closes #16960
🤖 Generated by Copilot at d6e1ccb
The pull request updates the
PopupModal
component and the portal tests to fix some signin issues and improve the test code quality. It replaces theFrame
component with adiv
element for the signin page, and uses thescreen
object and thepopupFrame
element for querying DOM elements.