OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <input type="submit" id="sub1"/> |
| 3 <input type="submit" id="sub2"/> |
| 4 <style> |
| 5 #sub1:active { |
| 6 display: none; |
| 7 } |
| 8 #sub2:hover { |
| 9 display: none; |
| 10 } |
| 11 </style> |
| 12 <script> |
| 13 if (window.eventSender) { |
| 14 // Tests if the display style is applied and restored properly when display:
none is set on active state |
| 15 var b1 = document.getElementById("sub1"); |
| 16 var startX = b1.offsetLeft + b1.offsetWidth/2; |
| 17 var startY = b1.offsetTop + b1.offsetHeight/2; |
| 18 var endX = startX + b1.offsetWidth; |
| 19 var endY = startY + b1.offsetHeight; |
| 20 eventSender.dragMode = true; |
| 21 eventSender.mouseMoveTo(startX, startY); |
| 22 eventSender.mouseDown(); |
| 23 eventSender.mouseMoveTo(endX, endY); |
| 24 eventSender.mouseUp(); |
| 25 |
| 26 // Tests if the display style is applied and restored properly when display:
none is set on hover state |
| 27 var b2 = document.getElementById("sub2"); |
| 28 var x = b2.offsetLeft + b2.offsetWidth/2; |
| 29 var y = b2.offsetTop + b2.offsetHeight/2; |
| 30 eventSender.mouseMoveTo(x, y); |
| 31 eventSender.mouseMoveTo(x + b2.offsetWidth, y + b2.offsetHeight); |
| 32 } |
| 33 </script> |
OLD | NEW |