title: CSS3 transition in mobile Safari breaks CSS property changes?
body: <p>I have a page with an element that moves when certain events fire.  I'm using a CSS3 transition to make it move smoothly.  It works great on Firefox, Chromium (Google Chrome), and Safari (Windows), Android Browser (2.3.7), and Firefox Mobile for Android (a.k.a. Fennec).  On Internet Explorer, it ignores the transition property and just moves the element suddenly as expected.</p>
  
  <p>It's not working on Mobile Safari, though.  If I have <code>-webkit-transition</code> defined, the element doesn't move at all.  I'm testing with a 1st gen iPod Touch, so this may only be an issue with older versions.  My iOS version is 3.1.3 (7E18).</p>
  
  <p>JavaScript animation effects (via jQuery) work okay, but don't run as smoothly on any of the devices mentioned.  I'd rather use the CSS3 solution.</p>
  
  <p>Is this a problem with newer iOS devices as well?</p>
  
  <p>Is the problem documented and explained?  If so, can someone provide a link?</p>
  
  <p>Is there a work-around?</p>
  
  <p>I've created a simple test page demonstrating my problem.  As I've said, the element doesn't move in Mobile Safari unless I remove the <code>-webkit-transition</code> line.</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;meta name="viewport" content="initial-scale=1"&gt;
      &lt;style type="text/css"&gt;
          #box {
              border: 3px outset gray;
              font-size: xx-small;
              color: silver;
              background-color: black;
              position: absolute;
              width: 50px;
              height: 50px;
              top: 100px;
              left: 220px;
              -webkit-transition: all 1s ease;
              -moz-transition: all 1s ease;
          }
  
          a {
              display: table-cell;
              text-align: center;
              vertical-align: middle;
              color: black;
              text-decoration: none;
              width: 100px;
              height: 100px;
              background-color: silver;
              border: 2px outset gray;
          }
      &lt;/style&gt;
  
      &lt;script type="text/javascript"&gt;
          var box;
          window.onload = function(){
              box = document.getElementById("box");
          }
  
          var getTop = function(obj){
              var curtop = obj.offsetTop;
              obj = obj.offsetParent;
              while (obj){
                  curtop += obj.offsetTop;
                  obj = obj.offsetParent;
              }
              return curtop;
          };
  
          var moveUp = function(obj){
              var curtop = getTop(obj);
              obj.style.top = (curtop - 20) + "px";
              return false;
          };
  
          var moveDown = function(obj){
              var curtop = getTop(obj);
              obj.style.top = (curtop + 20) + "px";
              return false;
          };
      &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;div id="box"&gt;
          &lt;p&gt;This is the box.&lt;/p&gt;
      &lt;/div&gt;
  
      &lt;a href="#" onclick="return moveUp(box);"&gt;Move Up&lt;/a&gt;
      &lt;a href="#" onclick="return moveDown(box);"&gt;Move Down&lt;/a&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Thank you.</p>