Bug Tracker

Opened 12 years ago

Closed 12 years ago

#9567 closed bug (invalid)

jQuery bug with $('#sth').width();

Reported by: anonymous Owned by: anonymous
Priority: undecided Milestone: 1.next
Component: unfiled Version: 1.6.1
Keywords: Cc:
Blocked by: Blocking:


I found this bug in jQuery (normal version, NOT iPhone). On my web browser - Google Chrome or Firefox, it works okay, but the problem comes when i open my site on the iPhone. The problem is, when I use this piece of code, all the links and clicks on my site seems like they are disabled. Every click is 'denied', 'ignored'. Here is it:

(function($) {

$.mouseLoader = function(stngs) {

settings = jQuery.extend({ bindToAjax: true }, stngs);

if($('#mouseLoader').length == 0) {

$('body').prepend('<div id="mouseLoader"><img src="/img/ajax-loader.gif" /></div>'); var mouseLoader = $('#mouseLoader'); $(document).bind('mousemove', function(event) {

var newtop = $(document).scrollTop()+event.clientY+10; var newleft = $(document).scrollLeft()+event.clientX+10;

if(newleft+mouseLoader.width() > $(document).width()) newleft = $(document).width()-mouseLoader.width(); if(newtop+mouseLoader.height() > $(document).height()) newtop = $(document).height()-mouseLoader.height();

mouseLoader.css({'top': newtop, 'left': newleft});



if(settings.bindToAjax) jQuery(document).ajaxStart(function(){ $.mouseLoader.show() }).ajaxStop(function(){ $.mouseLoader.hide() });

$.mouseLoader.show = function(hide) {

$('#mouseLoader').fadeIn(); if(hide) $.mouseLoader.hide(hide)


$.mouseLoader.hide = function(hide) {

setTimeout(function(){ $('#mouseLoader').fadeOut(); }, hide);




The solution I found is by replacing the code on line 10 by this: var mouseLoader = $('#mouseLoader').get(0);

Change History (4)

comment:1 Changed 12 years ago by ajpiano

Owner: set to anonymous
Status: newpending

Thanks for taking the time to contribute to the jQuery project! Please provide a reduced test case on http://jsfiddle.net that reproduces the issue experienced to help us assess your ticket.

Additionally, test against the jQuery (edge) version to ensure the issue still exists.

comment:2 Changed 12 years ago by anonymous

Status: pendingnew

Sorry, but I don't have enough time for that now... :( Im really busy

comment:3 Changed 12 years ago by ajpiano

Status: newpending

So are we :) I'm returning the ticket status back to pending your reply. If you are able to create some sort of tangible test case in the next two weeks, then do so, otherwise the ticket will automatically be closed.

comment:4 Changed 12 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!

Note: See TracTickets for help on using tickets.