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

Adding CSS to Editable tag messes up the placeholder #5063

Closed
davidsword opened this issue Feb 14, 2018 · 2 comments
Closed

Adding CSS to Editable tag messes up the placeholder #5063

davidsword opened this issue Feb 14, 2018 · 2 comments
Labels
Needs Testing Needs further testing to be confirmed. [Priority] Low Used to indicate that the issue at hand isn't a top priority to address and can be handled later [Status] Needs More Info Follow-up required in order to be actionable. [Type] Bug An existing feature does not function as intended
Milestone

Comments

@davidsword
Copy link
Contributor

davidsword commented Feb 14, 2018

Safari 11, wp 4.9.4, gb 2.1.0

Got an Editable component

<div className="textBox">
    <Editable
        tagname="div"
        multiline="p"
        className="textBoxContent"
        placeholder="...."
        value={ attributes.content }
        onChange={ onChangeContent }
    />
</div>

The Editor .textBoxContent has some CSS to it, within the editor:

div.textBox {
    margin: 20px 0;
    .textBoxContent {
        width: 90%;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
        border: 1px solid red;
    }
}

The CSS messes changes mess with .blocks-editable__tinymce[data-is-placeholder-visible=true] element (the one that only shows when there's no content in Editor). Perhaps the placeholder needs some better CSS mirroring to factor in developers doing weird css things like I've done?

weird

Don't know if it's as simple as "don't change the size/position of your Editable tag then" or if ya'll at a point of factoring in developer plugins - but thought I'd bring it up.

@davidsword davidsword changed the title Adding CSS to Editable messes up Adding CSS to Editable div messes up the placeholder Feb 14, 2018
@davidsword davidsword changed the title Adding CSS to Editable div messes up the placeholder Adding CSS to Editable tag messes up the placeholder Feb 14, 2018
@aduth
Copy link
Member

aduth commented Feb 15, 2018

Possibly related: #5035

@jeffpaul jeffpaul added the [Type] Bug An existing feature does not function as intended label Mar 8, 2018
@designsimply designsimply added the Needs Testing Needs further testing to be confirmed. label Jul 19, 2018
@mtias mtias added the [Priority] Low Used to indicate that the issue at hand isn't a top priority to address and can be handled later label Oct 29, 2018
@earnjam earnjam added this to the Future: 5.1 milestone Nov 11, 2018
@youknowriad
Copy link
Contributor

A lot of changes happened since this (including the component being rename RichText now). Is this still an issue?

@youknowriad youknowriad added the [Status] Needs More Info Follow-up required in order to be actionable. label Jan 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Testing Needs further testing to be confirmed. [Priority] Low Used to indicate that the issue at hand isn't a top priority to address and can be handled later [Status] Needs More Info Follow-up required in order to be actionable. [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

7 participants