1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-06-01 12:05:37 +02:00

Prevent style switcher from blocking the tab key. #49335

Tested under FF 3.0/3.5/Opera/Chrome on Linux



git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9994 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Chris Smith 2009-08-15 20:44:53 +00:00
parent 0393a6232b
commit e63b12c4b1
3 changed files with 37 additions and 4 deletions

View File

@ -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>

View File

@ -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 -->

View File

@ -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)