Bug Tracker

Custom Query (13852 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (13 - 15 of 13852)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Ticket Resolution Summary Owner Reporter
#2032 fixed clientLeft should be clientTop in event.fix? arrix
Description
event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc.clientLeft || 0);

I think doc.clientLeft should be doc.clientTop

#2037 fixed using innerHTML can cause css display errors in Opera davidserduke
Description

There are times when setting innerHTML can cause the css display value to be incorrect in Opera. This is a rather convoluted issue and one specific case has been identified and is shown in the attached test case.

Basically, when a div structure like this exists

<style type="text/css">
  #hid { display:none; }
</style>
<div id="container" style="display:none;">
  <div>
    <div id="hid">hidden</div>
  </div>
</div>  

and you set the innerHTML (yes you set it to itself):

$("#container")[0].innerHTML = $("#container")[0].innerHTML;

it can cause the display value from .css() to give improper results on the inner div. In this case, #hid should be display:none but instead it returns display:block.

There are many things that appear to be required so far to cause the bug including the #container div must be display:none or an ancestor must be. There must be a div between the #container and the #hid. The #hid must be display:none through a cascade in the stylesheet and cannot be style="display:none;". And, of course, it only happens in Opera. There may be other criteria or cases too but this is the only one I've found so far.

Interestingly there is a way to fix it as well by doing

var elem = $("#hid")[0];
var save = elem.style.display;
elem.style.display = "block";
elem.style.display = save;

Clearly this should just set the display to block then immediately reset to the original value. It has the consequence of "fixing" the Opera problem though such that the .css() value becomes "none" again as it should be.

No one has reported this bug in a real-life instance. It was found in the test suite which is constantly reseting the innerHTML of the test area thus giving the problem a chance to surface which it did. At this time it is not clear what the best fix is so we are opening a ticket for it.

#2050 worksforme Created options are always selected john
Description
>>> $("<option>test</option>")[0].selected
true
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Note: See TracQuery for help on using queries.