GoodCoMan

Q: Safari 7.1 span display bug

Safari 7.1 has a bug regarding the display CSS property of span elements.

 

The following page is a minimized version of the problem.

The line "This line should be visible", starts with style display none due to Stylesheet, but is then shown via jQuery with class selection when document ready.

Safari 7.1 fails to show the line.

 

There are a number of modifications that work around the bug:

  • Remove the first <br />
  • Remove the last <br />
  • Change the span elements to div

 

This is wreaking havoc with my Mac users!  The workarounds are not a reasonable option since our business has an extensive site that expects browsers to behave properly.

 

Live example at: http://jsfiddle.net/61hrkge7/

 

<html>

    <head>

        <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>

        <script type="text/javascript">

            $(document).ready(function ()

            {

                $('.startsHidden').show();

                $('.startsVisible').hide();

            });

        </script>

        <style type="text/css">

            .startsHidden { display:none; }

        </style>

    </head>

    <body>

        <div>

            <br />

            <span class="startsVisible">

                This line should be hidden<br />

            </span>

            <span class="startsHidden">

                This line should be visible<br />

            </span>

            <br />

        </div>

    </body>

</html>

iMac (21.5-inch Mid 2011), OS X Mavericks (10.9.5), Safari 7.1

Posted on Oct 12, 2014 8:33 PM

Close

Q: Safari 7.1 span display bug

  • All replies
  • Helpful answers

  • by Josh.stout,

    Josh.stout Josh.stout Oct 14, 2014 7:58 AM in response to GoodCoMan
    Level 1 (0 points)
    Oct 14, 2014 7:58 AM in response to GoodCoMan

    Here is a fix we have found to work.

    You will need to update compat.browser under your iis sites.


    for example:

    On a share point farm we have a root of wss and sub sites below it.


    For each site under wwwroot->wss

    Go into the App_Browsers folder and add a following line into the compat.browser file below the current safari entry.

     

        <browser refID="Safari60">

            <controlAdapters>

                <adapter controlType="System.Web.UI.WebControls.Menu" adapterType="" />

            </controlAdapters>

        </browser>

  • by JohnArtist,

    JohnArtist JohnArtist Oct 14, 2014 8:51 AM in response to GoodCoMan
    Level 1 (68 points)
    Desktops
    Oct 14, 2014 8:51 AM in response to GoodCoMan

    Yes, Safari 7.1 is filled with bugs.

    1. Type in embedded files does not show. Each character is displayed as an "A" in a box.
    2. A number of the websites I am working on are not showing correctly. Right now, I am trying to figure out why my H2 tag is suddenly displaying as it they had a -50px margin. Everything shifts! 

    This is nuts!  Everything shows correctly in Chrome, Firefox.

  • by GoodCoMan,

    GoodCoMan GoodCoMan Oct 20, 2014 12:15 PM in response to GoodCoMan
    Level 1 (0 points)
    Oct 20, 2014 12:15 PM in response to GoodCoMan

    Does Apple read these threads?  Is there a better place for developers to report this as a bug in Safari?  I see no indication they've read this.