From 001c5fbf0cffaa78e9c0f98668d4d60838eec20e Mon Sep 17 00:00:00 2001 From: jdlrobson Date: Mon, 7 May 2018 12:45:13 -0700 Subject: [PATCH] jquery-tablesorter and sortable classes always added together If absent, jquery-tablesorter should add the sortable class. The sortable class should be used to avoid FOUC, but clients may need time to update their interfaces to do so. Bug: T194045 Change-Id: I76709bf30ab06ff5ee7fc18bed1f143002477529 --- resources/src/jquery/jquery.tablesorter.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/resources/src/jquery/jquery.tablesorter.js b/resources/src/jquery/jquery.tablesorter.js index e9d5a917a0..552c0c394f 100644 --- a/resources/src/jquery/jquery.tablesorter.js +++ b/resources/src/jquery/jquery.tablesorter.js @@ -829,7 +829,11 @@ return; } } - $table.addClass( 'jquery-tablesorter' ); + // The `sortable` class is used to identify tables which will become sortable + // If not used it will create a FOUC but it should be added since the sortable class + // is responsible for certain crucial style elements. If the class is already present + // this action will be harmless. + $table.addClass( 'jquery-tablesorter sortable' ); // Merge and extend config = $.extend( {}, $.tablesorter.defaultOptions, settings ); -- 2.20.1