Bug Tracker

Opened 10 years ago

Closed 10 years ago

Last modified 9 years ago

#11298 closed bug (invalid)

Incorrect $(window).width() with 1.7.1 version

Reported by: [email protected] Owned by: [email protected]
Priority: undecided Milestone: None
Component: unfiled Version: 1.7.1
Keywords: Cc:
Blocked by: Blocking:

Description

$(window).width reports the wrong value for browser windows. It gets stuck at a certain minimum, when the window width is obviously much less.

Firefox 10.0 : 471 px Opera 11.61 : 115 px Chromium 18.0.1011 : 152 px QtWeb 3.7.3 : 148 px Lunascape 6.3.4 : 113 px Maxthon 3.1.5.1000 : 446 px

Change History (6)

comment:1 Changed 10 years ago by sindresorhus

Owner: set to [email protected]
Status: newpending

Thanks for taking the time to contribute to the jQuery project! Please provide a complete reduced 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 get started.

comment:2 Changed 10 years ago by [email protected]

Status: pendingnew

Tested and confirmed with :

<head>
	<script src="jquery-1.7.1.min.js" type="text/javascript"></script>
</head>
<body>

<div>
  <span id="Div_1"></span>
</div>

<script type="text/javascript">
$(window).load(function() {
  redimensionner();
  });

function redimensionner() {
	$('#Div_1').html($(window).width());
	}

$(window).resize(function () {
	redimensionner();
  });
</script>

</body>

comment:3 Changed 10 years ago by sindresorhus

Status: newpending

See the box in red, which is red for a reason:

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

Thank you :)

comment:4 Changed 10 years ago by anonymous

Please also check whether your browser is zoomed to 100%.

comment:5 Changed 10 years ago by trac-o-bot

Resolution: invalid
Status: pendingclosed

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!

comment:6 Changed 9 years ago by Rick Waldron

#12594 is a duplicate of this ticket.

Note: See TracTickets for help on using tickets.