Stop opening new tab on registering default irc handler
authorDarren <darren@darrenwhitlen.com>
Wed, 23 Jul 2014 19:03:48 +0000 (20:03 +0100)
committerDarren <darren@darrenwhitlen.com>
Wed, 23 Jul 2014 19:03:48 +0000 (20:03 +0100)
client/src/applets/settings.js

index aa5896d22d319520d69f49a8c006b01e2d021acc..b86d3d20a2714a5c3b2ca8f36a137b5579d3076a 100644 (file)
         },\r
 \r
         selectTheme: function(event) {\r
+            event.preventDefault();\r
+\r
             $('[data-setting="theme"].active', this.$el).removeClass('active');\r
             $(event.currentTarget).addClass('active').trigger('change');\r
-            event.preventDefault();\r
         },\r
 \r
         registerProtocol: function (event) {\r
+            event.preventDefault();\r
+\r
             navigator.registerProtocolHandler('irc', document.location.origin + _kiwi.app.get('base_path') + '/%s', 'Kiwi IRC');\r
             navigator.registerProtocolHandler('ircs', document.location.origin + _kiwi.app.get('base_path') + '/%s', 'Kiwi IRC');\r
         },\r