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:
parent
68411394b3
commit
900fe7dfd9
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user