title: Kendo UI Color picker crashes on close when data-bind attribute added
body: <p>I'm trying to use Kendo UI Color Picker with Kendo binding and run into problem.</p>
  
  <p>Kendo UI Color picker crashes when you click apply button on popup when data-bind attribute added. </p>
  
  <p>When I click on apply button it throws an error:</p>
  
  <pre><code>Uncaught TypeError: Cannot read property 'attr' of null
  </code></pre>
  
  <p>You can see example here: </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
    &lt;meta charset="utf-8"&gt;
    &lt;meta name="viewport" content="width=device-width"&gt;
    &lt;link href="https://kendo.cdn.telerik.com/2017.2.621/styles/kendo.common.min.css" rel="stylesheet"&gt;
  &lt;/head&gt;
  &lt;body&gt;
    
    &lt;div id="variables"&gt;
      &lt;div class="variables-grid"&gt;
        &lt;div data-template="variable-template" data-bind="source: variables"&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    
    &lt;script id="variable-template" type="text/x-kendo-template"&gt;
      # var templateId = getTemplateId(Type); #
      &lt;div class="variable"&gt;
          &lt;div data-template="#=templateId#" data-bind="source: this"&gt;&lt;/div&gt;
      &lt;/div&gt;
    &lt;/script&gt;
    
    &lt;script id="color-variable-template" type="text/x-kendo-template"&gt;
      &lt;input class="k-input" data-bind="value: Value" id="color-picker-#=Id#" name="color-picker-#=Id#" type="color" /&gt;&lt;script&gt;
   jQuery(function(){jQuery("\#color-picker-#=Id#").kendoColorPicker({});});
      &lt;\/script&gt;
    &lt;/script&gt;
      
  &lt;/script&gt;
  
  
  &lt;/body&gt;
    &lt;script src="https://code.jquery.com/jquery-1.12.4.js"&gt;&lt;/script&gt;
    &lt;script src="https://kendo.cdn.telerik.com/2017.2.621/js/kendo.all.min.js"&gt;&lt;/script&gt;
    
    &lt;script&gt;
      
      function getTemplateId(typeId) {
        switch(typeId) {
          case 'color':
            return "color-variable-template";
        }
      }
      
      var viewModel = kendo.observable({
        variables: [
          {"Id": "abc-color", "Type": "color", "Name": "Color", "Value": "#ffffff"}
        ]
      });
  
  
      kendo.bind($("#variables"), viewModel); 
    &lt;/script&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>When I remove data-bind attribute it works as should.</p>