mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
Update page history javascript so that it does not continously call element.compareDocumentPosition
This commit is contained in:
parent
b2f6456922
commit
fa8b9c143a
@ -156,10 +156,16 @@
|
||||
* Function: _unselect()
|
||||
*
|
||||
* Unselects the row from the form selection.
|
||||
*
|
||||
* Using regular js to update the class rather than this.removeClass('active')
|
||||
* because the latter causes the browser to continuously call
|
||||
* element.compareDocumentPosition, causing the browser to hang for long
|
||||
* periods of time, especially on pages with lots of versions (e.g. 100+)
|
||||
*/
|
||||
_unselect: function() {
|
||||
this.removeClass('active');
|
||||
this.find(":input[type=checkbox]").attr("checked", false);
|
||||
var tr = this.get(0);
|
||||
tr.className = $.trim(tr.className.replace('active', ''));
|
||||
this.find(":input[type=checkbox][checked]").attr("checked", false);
|
||||
},
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user