diff options
author | Timotej Lazar <timotej.lazar@fri.uni-lj.si> | 2015-11-19 10:34:12 +0100 |
---|---|---|
committer | Timotej Lazar <timotej.lazar@fri.uni-lj.si> | 2015-11-19 10:34:12 +0100 |
commit | df1704ef911847d4e390d1cde0cc80c35a19cbbe (patch) | |
tree | e13c73eb570ff0ce78b59b4875a1f189d1fd1390 /js/codeq/problem_list.js | |
parent | a184ad0a8a36c94669b6e07c311f4177a38edb63 (diff) |
Use preventDefault instead of return false for link events
Diffstat (limited to 'js/codeq/problem_list.js')
-rw-r--r-- | js/codeq/problem_list.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/js/codeq/problem_list.js b/js/codeq/problem_list.js index cc9e716..3fb9653 100644 --- a/js/codeq/problem_list.js +++ b/js/codeq/problem_list.js @@ -251,12 +251,13 @@ var language = data.language; jqScreen.html(data.html); codeq.tr.translateDom(jqScreen); - jqScreen.find('a').on('click', function () { + jqScreen.find('a').on('click', function (e) { var index = +$(this).attr('class').split(' ')[0].split('-')[1], ref = data.refs[index]; + e.preventDefault(); if (!ref) { codeq.log.error('Clicked on a problem link having erroneous index: ' + index); - return false; + return; } codeq.wait( Q.all([ @@ -274,7 +275,6 @@ alert('Failed to obtain the problem definition: ' + reason); }) .done(); - return false; }); }, |