#9106 closed bug (wontfix)
$('html').show(); does not work in firefox 3.6
Reported by: | Owned by: | Rick Waldron | |
---|---|---|---|
Priority: | low | Milestone: | 1.7 |
Component: | effects | Version: | 1.6 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description (last modified by )
With jquery 1.6 on firefox 3.6.17, .show(); does not seem to work on the html tag.
I have made a quick demo here:
demo: http://jsfiddle.net/UHEEm/
html: <html> <body> test </body> </html> css: html { display: none; } jquery: $('html').show(); //$('html').css('display', 'block'); //this works though.
Change History (22)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
The body tag looks like the only other tag that is affected by this bug.
comment:3 Changed 12 years ago by
Component: | unfiled → effects |
---|---|
Priority: | undecided → blocker |
Status: | new → open |
IMHO, like #8099 and this ticket, modifying the display property directly instead of via a class is flat out wrong. I'm going to recommend, for simplicity sake, that we just pre-define html & body in the in the elementdisplay object, something like this:
https://github.com/rwldrn/jquery/commit/435536606f8f5f341f6d923ea8c5a2084fbc41c7
While I don't think this is right, nor do I really think we should be making iframes to account for what amounts to BAD markup and styles, I guess people are doing it, so we need to address the issue.
Nearly a duplicate of #8099
comment:4 Changed 12 years ago by
Owner: | set to Rick Waldron |
---|---|
Status: | open → assigned |
comment:6 Changed 12 years ago by
Description: | modified (diff) |
---|
+0, Not fond of this issue, but it might be a bug
comment:9 Changed 12 years ago by
Description: | modified (diff) |
---|
+1, rwaldron's solution is an enabler of lame code but his heart is in the right place! :-)
comment:10 Changed 12 years ago by
Milestone: | 1.next → 1.6.2 |
---|
comment:11 Changed 12 years ago by
FYI Guys, this is in the same ballpark as the defaultDisplay bug #8099
We may need to draw the line somewhere
comment:13 Changed 12 years ago by
Replying to john:
+0, Ugh... why?
This is important for people who are using any type of notion of modules.
For example: those who use requirejs could need to wait until all of their required scripts are loaded. When all of those required scripts preform all their actions to alter the DOM on the page, then only do you want to show the entire page. Otherwise the page could look like a tetris while it loads.
This is common in many enterprise applications.
comment:14 Changed 12 years ago by
Description: | modified (diff) |
---|
@anonymous the problem with this is that when an end developer changes the _default_ display style property of an element, there is _NO_WAY_ to find out what it should really be without creating an iframe and appending a temporary test element to that iframe. We've been down this road and explored a breadth of potential solutions.
The fact is that changing the default display of an element as shown in the given example is a broken approach and in general a bad practice.
You could achieve exactly the same effect by using a class:
html: <html class="toggler"> <body> test </body> </html> css: .toggler { display: none; } jquery: $('html').show();
I move to close as invalid.
comment:16 Changed 12 years ago by
+0
Use CSS to hide the content, add classes to the HTML or BODY elements to show them when you want to.
comment:17 Changed 12 years ago by
Description: | modified (diff) |
---|
-1, How deep does the rabbithole go?
comment:18 Changed 12 years ago by
Description: | modified (diff) |
---|
-1, seems extremely rare and unnecessary to support
comment:20 Changed 12 years ago by
Resolution: | → wontfix |
---|---|
Status: | assigned → closed |
comment:21 Changed 12 years ago by
Keywords: | 1.7-discuss removed |
---|---|
Milestone: | 1.6.2 → 1.7 |
Priority: | blocker → low |
Seems like this is an issue if Firefox 4.0 as well