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 issue with chrome wrapping contents with span #873

Merged
merged 1 commit into from
Feb 20, 2020
Merged

fix issue with chrome wrapping contents with span #873

merged 1 commit into from
Feb 20, 2020

Conversation

ozdemirburak
Copy link
Contributor

Problem:

There is a problem with Google Chrome where it wraps contents of joined <p> with a <span> tag which was already mentioned in several issues like #203, #400, #523, #744.

A fiddle that shows the problem can be seen here.

Solution:
To differentiate the spans that belong to editor and the Chrome added ones, I've added a flag data-tbw-flag, which is added or removed when user hits backspace, enter or delete.

A fiddle that shows the effects of this PR can be seen here.

Tested with Google Chrome 70.0.3538.77 on Ubuntu 16.04.

@Alex-D Alex-D added the to review PR which is ready to merge label Nov 28, 2018
@Alex-D Alex-D self-requested a review November 28, 2018 00:57
@andreyryabin
Copy link

andreyryabin commented Jul 23, 2019

fix: remove background styles for reset-css in trumbowyg/ui/trumbowyg.css

.trumbowyg-editor.trumbowyg-reset-css div,
.trumbowyg-editor.trumbowyg-reset-css p,
.trumbowyg-editor.trumbowyg-reset-css ul,
.trumbowyg-editor.trumbowyg-reset-css ol,
.trumbowyg-editor.trumbowyg-reset-css blockquote {
    /*box-shadow: none !important;*/
    /*background: none !important;*/
    margin: 0 !important;
    margin-bottom: 15px !important;
    line-height: 1.4em !important;
    font-family: "Trebuchet MS", Helvetica, Verdana, sans-serif !important;
    font-size: 14px !important;
    border: none;
}

@mihai-craita
Copy link

Will this issue ever be fixed?

@Alex-D
Copy link
Owner

Alex-D commented Feb 20, 2020

Can you provide a demo page with the issue?

@ozdemirburak
Copy link
Contributor Author

Well, it has been more than a year but that fiddle is still valid.

Tested with Chrome 80 on Ubuntu 18.04.

@Alex-D Alex-D merged commit 19bd369 into Alex-D:develop Feb 20, 2020
@Alex-D
Copy link
Owner

Alex-D commented Feb 20, 2020

Sorry ^^'

I did not know why I did not merge that fix earlier...

Thank you for the fix :)

@ozdemirburak
Copy link
Contributor Author

Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
to review PR which is ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants