Side navigation
#8213 closed bug (duplicate)
Opened February 08, 2011 05:54PM UTC
Closed February 08, 2011 05:58PM UTC
Last modified March 14, 2012 02:42PM UTC
Strange behavior of hide() and show() in Google Chrome
| Reported by: | donny579@gmail.com | Owned by: | |
|---|---|---|---|
| Priority: | blocker | Milestone: | 1.5.1 |
| Component: | effects | Version: | 1.5 |
| Keywords: | Cc: | ||
| Blocked by: | Blocking: |
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>
Sorry for pasting the source into the ticket, I didn't mention the red box until now.