Bug Tracker

Modify

Ticket #8213 (closed bug: duplicate)

Opened 2 years ago

Last modified 14 months ago

Strange behavior of hide() and show() in Google Chrome

Reported by: donny579@… Owned by:
Priority: blocker Milestone: 1.5.1
Component: effects Version: 1.5
Keywords: Cc:
Blocking: Blocked by:

Description

How to reproduce:

  • HTML Document with linked jquery and stylesheet
  • in the document is inline element (f.ex. <strong>) which is styled in the linked stylesheet to "display: block"
  • The stylesheet MUST BE linked after jquery.
  • The stylesheet MUST BEGIN with @import(no_matter_what_is_here);
  • The <strong> (mentioned above) must be hidden by .hide() and shown by .show()

Expected result:

  • the <strong> should stay being block element after show() is applied to it

What's wrong:

  • in other browsers there appears style="display: block" in the <strong> tag - this is OK, because I set the element to be "block".
  • in Chrome there appears style="display: inline" in the tag and my style settings is overriden.

Using Google Chrome 9.0.597.84

style.css:

@import url(0); strong { display: block; }

file.html:

<html>
        <head>
                <script type="text/javascript" src="http://code.jquery.com/jquery-1.5.min.js"></script>
                <link rel="stylesheet" href="style.css" />
                <script type="text/javascript">

                $(document).ready(function() {
                        $('strong').hide();
                        $('strong').show();
                });

                </script>
        </head>
        <body>
                <strong>this is block</strong> this text should be on new line
        </body>
</html>

Change History

comment:1 Changed 2 years ago by donny579@…

Sorry for pasting the source into the ticket, I didn't mention the red box until now.

comment:2 Changed 2 years ago by jitter

  • Priority changed from undecided to blocker
  • Resolution set to duplicate
  • Status changed from new to closed
  • Component changed from unfiled to effects
  • Milestone changed from 1.next to 1.5.1

comment:3 Changed 2 years ago by jitter

Duplicate of #8099.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.