aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/docs/CHANGELOG.html1
-rw-r--r--phpBB/styles/prosilver/template/overall_header.html2
-rw-r--r--phpBB/styles/prosilver/template/styleswitcher.js38
3 files changed, 37 insertions, 4 deletions
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index b7295b898f..794efe0640 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -194,6 +194,7 @@
<li>[Fix] Update search index if only post subject changed. (Bug #49435)</li>
<li>[Fix] Fix who is online displaying incorrect data. (Bug #49485, thanks Brainy)</li>
<li>[Fix] Fixed incorrect &quot;topic does not exist&quot; when unapproved posts were visited without global moderator permissions. (Bug #47795)</li>
+ <li>[Fix] Prevent style switcher from blocking the tab key. (Bug #49335)</li>
<li>[Change] submit_post() now accepts force_approved_state key passed to $data to indicate new posts being approved (true) or unapproved (false).</li>
<li>[Change] Change the data format of the default file ACM to be more secure from tampering and have better performance.</li>
<li>[Change] Add index on log_time to the log table to prevent slowdown on boards with many log entries. (Bug #44665 - Patch by bantu)</li>
diff --git a/phpBB/styles/prosilver/template/overall_header.html b/phpBB/styles/prosilver/template/overall_header.html
index 9d4162591a..1ec9041b49 100644
--- a/phpBB/styles/prosilver/template/overall_header.html
+++ b/phpBB/styles/prosilver/template/overall_header.html
@@ -136,7 +136,7 @@
<ul class="linklist navlinks">
<li class="icon-home"><a href="{U_INDEX}" accesskey="h">{L_INDEX}</a> <!-- BEGIN navlinks --> <strong>&#8249;</strong> <a href="{navlinks.U_VIEW_FORUM}">{navlinks.FORUM_NAME}</a><!-- END navlinks --></li>
- <li class="rightside"><a href="#" onclick="fontsizeup(); return false;" onkeypress="fontsizeup(); return false;" class="fontsize" title="{L_CHANGE_FONT_SIZE}">{L_CHANGE_FONT_SIZE}</a></li>
+ <li class="rightside"><a href="#" onclick="fontsizeup(); return false;" onkeypress="return fontsizeup(event);" class="fontsize" title="{L_CHANGE_FONT_SIZE}">{L_CHANGE_FONT_SIZE}</a></li>
<!-- IF U_EMAIL_TOPIC --><li class="rightside"><a href="{U_EMAIL_TOPIC}" title="{L_EMAIL_TOPIC}" class="sendemail">{L_EMAIL_TOPIC}</a></li><!-- ENDIF -->
<!-- IF U_EMAIL_PM --><li class="rightside"><a href="{U_EMAIL_PM}" title="{L_EMAIL_PM}" class="sendemail">{L_EMAIL_PM}</a></li><!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/styleswitcher.js b/phpBB/styles/prosilver/template/styleswitcher.js
index 203d8e4c21..b6ba1ecdae 100644
--- a/phpBB/styles/prosilver/template/styleswitcher.js
+++ b/phpBB/styles/prosilver/template/styleswitcher.js
@@ -1,6 +1,12 @@
-function fontsizeup()
+function fontsizeup(event)
{
+ // Skip tabs
+ if (event && getKeyCode(event) == 9)
+ {
+ return true;
+ }
+
var active = getActiveStyleSheet();
switch (active)
@@ -29,11 +35,19 @@ function fontsizeup()
setActiveStyleSheet('A');
break;
}
+
+ return false;
}
-function fontsizedown()
+function fontsizedown(event)
{
- active = getActiveStyleSheet();
+ // Skip tabs
+ if (event && getKeyCode(event) == 9)
+ {
+ return true;
+ }
+
+ var active = getActiveStyleSheet();
switch (active)
{
@@ -60,6 +74,24 @@ function fontsizedown()
setActiveStyleSheet('A--');
break;
}
+
+ return false;
+}
+
+function getKeyCode(event)
+{
+ // IE doesn't fire the onkeypress event for tabs
+ // Reference: http://www.quirksmode.org/js/keys.html
+
+ var code = (event.keyCode) ? event.keyCode : 0;
+
+ // Probably using FF
+ if (!code && event.charCode)
+ {
+ code = event.charCode;
+ }
+
+ return code;
}
function setActiveStyleSheet(title)