Remove default event handler from theme switch links

On Chrome the default <a> event handler was firing after reload()
resulting in a change of location.

This was particularly noticeable on the new angular Swift UI.

Change-Id: I5b644f3b899a5a8c598ceae7cdb76a1e9fd89ebf
Closes-Bug: 1555429
This commit is contained in:
Richard Jones 2016-03-10 14:54:14 +11:00
parent 68411394b3
commit 900fe7dfd9
1 changed files with 4 additions and 0 deletions

View File

@ -27,6 +27,10 @@
$(document).on('click', '.theme-picker-item', function(e) {
var $this = $(this);
// prevent the default <a> click handler from firing - on
// Chrome it confuses the reload() we do below
e.preventDefault();
if($this.hasClass('disabled')) {
e.stopPropagation();
return;