From 7bdf6e025f1fbbbc7af65f80ff7aa5922ff8e252 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Tue, 19 Jun 2018 13:06:02 +0200 Subject: dashboard/app: fix table sorting on firefox Under Firefox 60 browser, sort operation does not work and ReferenceError: event is not defined error message is printed in the Web Console window. Let's explicitly pass an object reference to the sortTable function. Credit goes to Tetsuo Handa. --- dashboard/app/static/common.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'dashboard/app/static') diff --git a/dashboard/app/static/common.js b/dashboard/app/static/common.js index c2e021d81..5b4f8737c 100644 --- a/dashboard/app/static/common.js +++ b/dashboard/app/static/common.js @@ -1,8 +1,8 @@ // Copyright 2018 syzkaller project authors. All rights reserved. // Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. -function sortTable(colName, conv) { - table = event.srcElement.parentNode.parentNode.parentNode; +function sortTable(item, colName, conv) { + table = item.parentNode.parentNode.parentNode; rows = table.getElementsByTagName("tr"); col = findColumnByName(rows[0].getElementsByTagName("th"), colName); values = new Array; -- cgit mrf-deployment