willconant/flow-js

flow.exec doesn't seem to work properly on Windows Phone 7.5 or IE7

Opened this issue · 0 comments

Not sure if you are interested in supporting these browsers (I am !) Great little library you have here.

In my code below, the second function in the flow gets called before both callbacks when on IE, but in Chrome, the iPad, etc it works fine.

// in parallel start the transition and the XHR
var count = 0;
flow.exec(
  function() {
    // Start the CSS transition to hide
    var transMulti = this.MULTI();
    $control.parent().addClassTrans('removed', function() { count++; transMulti(); });

    // In parallel, tell the server to hide facets
    var xhrMulti = this.MULTI();
    x$(document).xhr(url, {
      data: 'facet=' + facetName,
      async: true,
      method: 'post',
      callback: function() { count++; xhrMulti(); }
    });                  
  },
  function() {          
    if (count != 2)
      alert('fucked: ' + count);
    // if we're selected, then hide our value pane
    if (selected) 
      hideValues();

    // actually remove it, now that its hidden
    $control.parent().remove();
    // fetch new facets            
    updateSuggested();
  }
);