From 900fe7dfd99e478e95dc219cd86756060c39986e Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Thu, 10 Mar 2016 14:54:14 +1100 Subject: [PATCH] Remove default event handler from theme switch links On Chrome the default 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 --- openstack_dashboard/templates/header/_theme_list.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/openstack_dashboard/templates/header/_theme_list.html b/openstack_dashboard/templates/header/_theme_list.html index 42bf97a20e..87063fbfa0 100644 --- a/openstack_dashboard/templates/header/_theme_list.html +++ b/openstack_dashboard/templates/header/_theme_list.html @@ -27,6 +27,10 @@ $(document).on('click', '.theme-picker-item', function(e) { var $this = $(this); + // prevent the default click handler from firing - on + // Chrome it confuses the reload() we do below + e.preventDefault(); + if($this.hasClass('disabled')) { e.stopPropagation(); return;