+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Safari browser produces span tags in Editor

Safari browser produces span tags in Editor

1 posts, 0 answered
  1. Daniel
    Daniel avatar
    1 posts
    Registered:
    17 Jan 2012
    17 Jan 2012
    Link to this post
    I've got a client who has discovered this little glitch while using Safari on a MacBook. I am unable to reproduce it on any other browser. I've narrowed down the problem to the following:
    For all browsers, if you have content of one type of html tag, be it a paragraph tag or a header tag, below content of a different html tag and you use the backspace button to make the bottom content merge with the top content, the merged content will be converted to the html tag that the top content had.
    For example, if you have a title in an <h1> tag and a paragraph of content below it in a <p> tag, and you were to place your cursor at the start of the paragraph and hit backspace, the content of the paragraph will now be an <h1> tag. (see fig. 1 below for a visual)

    ----------------------------------------------------------------------------(fig. 1)
    <h1>This is a Title</h1>
    <p>This is a paragraph</p>
    .....[place cursor at the start of the paragraph and hit backspace and you get the following].....
    <h1>This is a TitleThis is a paragraph</h1>
    ----------------------------------------------------------------------------

    The problem in Safari is, a <span> tag is being added that styles the content that was in the lower tag to APPEAR as if it were still of that tag. (see fig. 2 below for a visual)

    ---------------------------------------------------------------------------(fig. 2)
    <h1>This is a Title</h1>

    <p>This is a paragraph</p>

    .....[place cursor at the start of the paragraph and hit backspace and you get the following].....

    <h1>This is a Title
    <span style="font-size:12px; font-weight:normal;">This is a paragraph</span></h1>

    ----------------------------------------------------------------------------

    This results in the Display mode showing what appears to be the right tag, but once the changes are pushed, the site's css takes over and coverts the real h1, h2 tags into different sizes and colors than what Safari placed in the span tag.

    How do I address this issue so that my client doesn't have to keep checking the html code to see if it is converting their header tags into paragraph tags and vice versa?

    Thanks,
    Daniel
1 posts, 0 answered