Ticket #3296: web_fixRemoval.patch

File web_fixRemoval.patch, 668 bytes (added by Longinus00, 12 years ago)
  • web/javascript/transmission.js

    diff --git web/javascript/transmission.js web/javascript/transmission.js
    index 0feb90b..d16fefd 100644
    Transmission.prototype = 
    15661566                                var e = torrent.element();
    15671567                                if( e ) {
    15681568                                        var row_index = tr.getTorrentIndex(tr._rows, torrent);
     1569                                        //if torrent is not currently visible then delete a hidden row
     1570                                        //otherwise the row model gets corrupted because no row gets deleted
     1571                                        if( row_index == null ) row_index = tr._rows.length - 1;
    15691572                                        delete e._torrent; //remove circular refernce to help IE garbage collect
    15701573                                        tr._rows.splice(row_index, 1)
    15711574                                        e.remove();