Missing link target causes buttons to be unresponsive in some touch browers
authorAlexander Ebert <ebert@woltlab.com>
Fri, 18 Sep 2020 15:02:47 +0000 (17:02 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 18 Sep 2020 15:02:47 +0000 (17:02 +0200)
wcfsetup/install/files/acp/js/WCF.ACP.Style.js
wcfsetup/install/files/acp/templates/styleList.tpl

index 5f279e568a75edb06e80301fd22f65ef9a66f11d..f894733fc3da35ac82d620d4671350f49c2367b8 100644 (file)
@@ -478,7 +478,10 @@ WCF.ACP.Style.List = Class.extend({
                        var $styleID = $list.data('styleID');
                        
                        var self = this;
-                       $list.find('.jsSetAsDefault').click(function() { self._click('setAsDefault', $styleID); });
+                       $list.find('.jsSetAsDefault').click(function(event) {
+                               event.preventDefault();
+                               self._click('setAsDefault', $styleID);
+                       });
                        $list.find('.jsDelete').click(function(event) { self._delete(event, $styleID); });
                }, this));
        },
@@ -505,6 +508,8 @@ WCF.ACP.Style.List = Class.extend({
         * @param       integer         styleID
         */
        _delete: function(event, styleID) {
+               event.preventDefault();
+               
                var $confirmMessage = $(event.currentTarget).data('confirmMessageHtml');
                if ($confirmMessage) {
                        var self = this;
index 0f3c6dc8a574813998e49722695baffc9991190a..22674aa394ef2a4dfd6133c865bff34c05911386 100644 (file)
@@ -60,9 +60,9 @@
                                                                <li><a href="{link controller='StyleExport' id=$style->styleID}{/link}" title="{lang}wcf.acp.style.exportStyle{/lang}" class="jsTooltip"><span class="icon icon16 fa-download"></span> <span class="invisible">{lang}wcf.acp.style.exportStyle{/lang}</span></a></li>
                                                                
                                                                {if !$style->isDefault}
-                                                                       <li><a title="{lang}wcf.global.button.{if $style->isDisabled}enable{else}disable{/if}{/lang}" class="jsTooltip"><span class="icon icon16 fa-{if !$style->isDisabled}check-{/if}square-o jsToggleButton" data-object-id="{@$style->styleID}"></span> <span class="invisible">{lang}wcf.global.button.{if $style->isDisabled}enable{else}disable{/if}{/lang}</span></a></li>
-                                                                       <li><a title="{lang}wcf.acp.style.button.setAsDefault{/lang}" class="jsSetAsDefault jsTooltip"><span class="icon icon16 fa-check-circle"></span> <span class="invisible">{lang}wcf.acp.style.button.setAsDefault{/lang}</span></a></li>
-                                                                       <li><a title="{lang}wcf.global.button.delete{/lang}" class="jsDelete jsTooltip" data-confirm-message-html="{lang __encode=true}wcf.acp.style.delete.confirmMessage{/lang}"><span class="icon icon16 fa-times"></span> <span class="invisible">{lang}wcf.global.button.delete{/lang}</span></a></li>
+                                                                       <li><a href="#" title="{lang}wcf.global.button.{if $style->isDisabled}enable{else}disable{/if}{/lang}" class="jsTooltip"><span class="icon icon16 fa-{if !$style->isDisabled}check-{/if}square-o jsToggleButton" data-object-id="{@$style->styleID}"></span> <span class="invisible">{lang}wcf.global.button.{if $style->isDisabled}enable{else}disable{/if}{/lang}</span></a></li>
+                                                                       <li><a href="#" title="{lang}wcf.acp.style.button.setAsDefault{/lang}" class="jsSetAsDefault jsTooltip"><span class="icon icon16 fa-check-circle"></span> <span class="invisible">{lang}wcf.acp.style.button.setAsDefault{/lang}</span></a></li>
+                                                                       <li><a href="#" title="{lang}wcf.global.button.delete{/lang}" class="jsDelete jsTooltip" data-confirm-message-html="{lang __encode=true}wcf.acp.style.delete.confirmMessage{/lang}"><span class="icon icon16 fa-times"></span> <span class="invisible">{lang}wcf.global.button.delete{/lang}</span></a></li>
                                                                {/if}
                                                                
                                                                {event name='itemButtons'}