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

Make the entire preview clickable in order to enter "edit" mode in focus mode. #51973

Merged
merged 1 commit into from
Jun 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ function EditorCanvas( { enableResizing, settings, children, ...props } ) {
// which isn't a requirement in auto resize mode.
enableResizing ? 'min-height:0!important;' : ''
}}body{position:relative; ${
canvasMode === 'view' ? 'cursor: pointer;' : ''
canvasMode === 'view'
? 'cursor: pointer; height: 100vh'
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure 100vh is the right way to go about this but min-height:100% isn't working and I don't understand why. If you manually add something like border: 10px solid yellow; to the body you will see scrollbars. I don't think this should block your PR but I'm going to investigate why min-height isn't working with how the HTML element is styled.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok I see why, html needs to have height:100% instead of height: auto; for the min-height on body to work. But that produces scrollbars anyway on the edge case that I mentioned, so let's forget I said anything and go with your solution then. I doubt we will see many cases where this happens.

: ''
}}}`
}</style>
{ children }
Expand Down
Loading