Side navigation
#11619 closed bug (invalid)
Opened April 22, 2012 03:19PM UTC
Closed May 07, 2012 08:34AM UTC
Last modified February 02, 2013 09:58AM UTC
I cannot get valid height on Firefox, bug?
Reported by: | cyross _at_ po.twin.ne.jp | Owned by: | cyross _at_ po.twin.ne.jp |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.7.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Hi.
I'll trying to check a value of $(window).width and $(window).height.
I succeed to get valid value on GoogleChrome(18), IE9, Android Browser(2.3.4).
But I cannot get valid height(height=8) on Firefox(11)
This problem occurred by jQuery's but? Firefox's bug?
Here is test code.
index.html
<DOCTYPE HTML> <html> <head> <meta charset=utf-8> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <title>jQuery test</title> <link rel="stylesheet" href="gst.css" type="text/css" /> <script type="text/javascript" src="jquery-1.7.2.js"></script> <script type="text/javascript" src="gst.js"></script> </head> <body> </body> </html>
gst.js
(function(win){ var size = {width: 0, height: 0}; $(document).ready(function(){ size.width = $(this).width(); size.height = $(this).height(); $("body").append("Width:"+size.width+" Height:"+size.height); $("body").css("overflow", "hidden"); $div = $("<div />"); $div.css("position", "absolute"); $div.css("left", size.width - 1); $div.css("top", size.height - 1); $div.width(16); $div.height(16); $div.css("background-color", "red"); $div.appendTo($("body")); }); })(window);
Attachments (0)
Change History (5)
Changed April 22, 2012 03:32PM UTC by comment:1
Changed April 22, 2012 04:49PM UTC by comment:2
owner: | → cyross _at_ po.twin.ne.jp |
---|---|
status: | new → pending |
Thanks for taking the time to contribute to the jQuery project! Please put your code in a test case on jsFiddle to help us assess your ticket!
Additionally, be sure to test against the "jQuery (edge)" version to ensure the issue still exists. To get you started, use this boilerplate: http://jsfiddle.net/FrKyN/
Open the link and click to "Fork" (in the top menu) to begin.
Changed May 07, 2012 08:34AM UTC by comment:3
resolution: | → invalid |
---|---|
status: | pending → closed |
Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!
Changed February 02, 2013 09:54AM UTC by comment:4
I am seeing the same behaviour.
This is my user agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1016.0 Safari/535.19
Using jQuery 1.8.3
Changed February 02, 2013 09:58AM UTC by comment:5
nvm, found the resolution here: http://stackoverflow.com/questions/12937494/why-does-firefox-return-0-as-the-value-of-window-height
sorry, my mistake...
gst.js