title: Knockoutjs with jQuery UI drag & drop fails in IE8
body: <p>I am using knockoutjs with the jquery drag &amp; drop and it works well in Chrome, Firefox, IE9 but not IE8. I can't post the actual code but I created a jsfiddle example where the bug can be reproduced. Please take a look <a href="http://jsfiddle.net/wired1/P9hns/20/" rel="nofollow">http://jsfiddle.net/wired1/P9hns/20/</a>
  It works great in the latest Firefox, Chrome and IE9. However in IE8 when attempting to drag I get the following error:</p>
  
  <blockquote>
    <h2>IE8 error #1</h2>
    
    <p>SCRIPT5007: Unable to get value of the property 'options': object is null or undefined 
    jquery-ui.1.8.18.js, line 1412 character 13</p>
  </blockquote>
  
  <p>Here is the referenced code in jquery ui:</p>
  
  <pre><code>$.ui.plugin.add("draggable", "cursor", {
  start: function(event, ui) {
      var t = $('body'), o = $(this).data('draggable').options;
      if (t.css("cursor")) o._cursor = t.css("cursor");
      t.css("cursor", o.cursor);
  },
  stop: function(event, ui) {
  
          var o = $(this).data('draggable').options;
          if (o._cursor) $('body').css("cursor", o._cursor);
  
  }
  });
  </code></pre>
  
  <p>It is the declaration of variable o in the stop function: <strong>var o = $(this).data('draggable').options;</strong></p>
  
  <p>If I comment out those two lines in jquery ui I get the following error:</p>
  
  <blockquote>
    <h2>IE8 error #2</h2>
    
    <p>SCRIPT5007: Unable to get value of the property 'options': object is null or undefined 
    jquery-ui.1.8.18.js, line 1439 character 38</p>
  </blockquote>
  
  <p>That points to:</p>
  
  <pre><code>$.ui.plugin.add("draggable", "scroll", {
  start: function(event, ui) {
      var i = $(this).data("draggable");
      if(i.scrollParent[0] != document &amp;&amp; i.scrollParent[0].tagName != 'HTML') i.overflowOffset = i.scrollParent.offset();
  },
  drag: function(event, ui) {
  
      var i = $(this).data("draggable"), o = i.options, scrolled = false;
  ........................
  </code></pre>
  
  <p>It is the last line from the above snippet where <strong>o = i.options</strong>.</p>
  
  <p>If I set {scroll: false} as an option for the jqueryui draggable the error goes away, but it still won't work.</p>
  
  <p>It seems that as I start to drag all events fire in order one after the other even though the mouse click was not released (when running the code test in jsfiddle look at the console to see the logs).</p>
  
  <p>Is it a jquery ui issue or am I doing something wrong? Any help with this is greatly appreciated. </p>