From: Marcel Werk Date: Thu, 28 Aug 2014 15:24:19 +0000 (+0200) Subject: Improved keyboard-based navigation X-Git-Tag: 2.1.0_Alpha_1~380^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0078c42a87dd1e6d88bca3ae0e35f049aa98b29b;p=GitHub%2FWoltLab%2FWCF.git Improved keyboard-based navigation --- diff --git a/com.woltlab.wcf/templates/header.tpl b/com.woltlab.wcf/templates/header.tpl index 31c26fe760..524e5bd957 100644 --- a/com.woltlab.wcf/templates/header.tpl +++ b/com.woltlab.wcf/templates/header.tpl @@ -39,7 +39,7 @@ diff --git a/wcfsetup/install/files/js/WCF.User.js b/wcfsetup/install/files/js/WCF.User.js index 41357e1771..6c3bb8d49e 100644 --- a/wcfsetup/install/files/js/WCF.User.js +++ b/wcfsetup/install/files/js/WCF.User.js @@ -2726,6 +2726,7 @@ WCF.User.ObjectWatch.Subscribe = Class.extend({ * @param object event */ _click: function(event) { + event.preventDefault(); var $button = $(event.currentTarget); this._proxy.setOption('data', { diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index 5184360261..251ed77cba 100755 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -9935,7 +9935,9 @@ WCF.Sitemap = Class.extend({ /** * Handles clicks on the sitemap icon. */ - _click: function() { + _click: function(event) { + event.preventDefault(); + if (this._dialog === null) { this._dialog = $('
').appendTo(document.body); @@ -10159,7 +10161,7 @@ WCF.Style.Chooser = Class.extend({ * Initializes the style chooser class. */ init: function() { - $('
  • ' + WCF.Language.get('wcf.style.changeStyle') + '
  • ').appendTo($('#footerNavigation > ul.navigationItems')).click($.proxy(this._showDialog, this)); + $('
  • ' + WCF.Language.get('wcf.style.changeStyle') + '
  • ').appendTo($('#footerNavigation > ul.navigationItems')).click($.proxy(this._showDialog, this)); this._proxy = new WCF.Action.Proxy({ success: $.proxy(this._success, this) @@ -10170,6 +10172,8 @@ WCF.Style.Chooser = Class.extend({ * Displays the style chooser dialog. */ _showDialog: function() { + event.preventDefault(); + if (this._dialog === null) { this._dialog = $('
    ').hide().appendTo(document.body); this._loadDialog();