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

Chrome: Fix empty post placeholder hover effect #1200

Merged
merged 1 commit into from
Jun 16, 2017

Conversation

youknowriad
Copy link
Contributor

Addresses the comment here #1195 (comment)

The input has not before content area which caused a regression in the hover effect.

@youknowriad youknowriad self-assigned this Jun 15, 2017
@youknowriad youknowriad requested a review from aduth June 15, 2017 17:38
margin-left: auto;
margin-right: auto;
max-width: $visual-editor-max-width;
position: relative;
padding: $block-padding;
border: none;
border: 2px solid transparent;
Copy link
Member

Choose a reason for hiding this comment

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

Minor: Adding the border pushes the text to the right by 2px. I only noticed it upon refreshing from master to this branch, but it also appears slightly offset from both the title and following inserter.

We might consider a margin: 0 -2px to offset (optionally applying both margin and border only ever to the left side).

Can't do margin because we need the auto. Since we're already applying position: relative, we could do left: -2px instead.

@aduth
Copy link
Member

aduth commented Jun 15, 2017

While we're here, you should throw a readOnly on that input, because it's logging an error:

react-dom.e5cfcfc9.js?ver=4.8-RC2-40880:1149 Warning: Failed form propType: You provided a value prop to a form field without an onChange handler. This will render a read-only field. If the field should be mutable use defaultValue. Otherwise, set either onChange or readOnly.

@youknowriad
Copy link
Contributor Author

youknowriad commented Jun 16, 2017

Feedback addressed, merging to use this as a base for #1209

@youknowriad youknowriad merged commit 9ec4261 into master Jun 16, 2017
@youknowriad youknowriad deleted the fix/empty-placeholder-hover branch June 16, 2017 09:42
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

Successfully merging this pull request may close these issues.

2 participants