Jump to top of page on Changelog click, PMF 2.6.5

Please report bugs here!

Moderator: Thorsten

Post Reply
dajoker
Posts: 59
Joined: Sat Jan 30, 2010 1:01 am

Jump to top of page on Changelog click, PMF 2.6.5

Post by dajoker » Tue Jun 08, 2010 6:41 pm

When working w/PMF 2.6.5 and creating a FAQ any clicking on either of the 'Changelog' links at the bottom immediately cause the browser to jump to the top of the screen. I believe this is because the id being selected by the JavaScript does not exist so it just heads to the top as a last resort. This happens in both Firefox 3.5.9 (OpenSUSE 11.2 x86_64) and Google Chrome 5.0.375.55.

<legend><a href="#" onclick="javascript:toggleFieldset('Changelog');">Changelog</a></legend>
<div id="editChangelog" style="display: none;">

<legend><a href="#" onclick="javascript:toggleFieldset('ChangelogHistory');">Changelog</a></legend>
<div id="editChangelogHistory" style="display: none;">

I'll be working on fixing this later in my setup but knowing it was reported would be comforting.

Thanks.

dajoker
Posts: 59
Joined: Sat Jan 30, 2010 1:01 am

Re: Jump to top of page on Changelog click, PMF 2.6.5

Post by dajoker » Tue Jun 08, 2010 6:58 pm

Um.... errr....... no. My initial analysis was completely wrong since the JS function actually adds 'edit' on the beginning. Still looking for something valid.....

Thorsten
Posts: 15076
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Jump to top of page on Changelog click, PMF 2.6.5

Post by Thorsten » Tue Jun 08, 2010 7:58 pm

Hi,

here's the fix: http://github.com/thorsten/phpMyFAQ/com ... 662391e6f5

Thanks for the hint!

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

dajoker
Posts: 59
Joined: Sat Jan 30, 2010 1:01 am

Re: Jump to top of page on Changelog click, PMF 2.6.5

Post by dajoker » Wed Jun 09, 2010 4:17 am

Perfect. Thank-you for that fix.

dajoker
Posts: 59
Joined: Sat Jan 30, 2010 1:01 am

Re: Jump to top of page on Changelog click, PMF 2.6.5

Post by dajoker » Sun Jun 13, 2010 3:35 am

The three links in the body on the 'Configuration' page within the administrative interface also have this same problem. The same fix resolves things:

<diff file='./phpmyfaq/admin/configuration.php' version='2.6.5'>
82c82
< <legend><a href="#" onclick="javascript:toggleConfig('Main');"><?php print $PMF_LANG['mainControlCenter']; ?></a></legend>
---
> <legend><a href="javascript:void(0);" onclick="javascript:toggleConfig('Main');"><?php print $PMF_LANG['mainControlCenter']; ?></a></legend>
86c86
< <legend><a href="#" onclick="javascript:toggleConfig('Records');"><?php print $PMF_LANG['recordsControlCenter']; ?></a></legend>
---
> <legend><a href="javascript:void(0);" onclick="javascript:toggleConfig('Records');"><?php print $PMF_LANG['recordsControlCenter']; ?></a></legend>
90c90
< <legend><a href="#" onclick="javascript:toggleConfig('Spam');"><?php print $PMF_LANG['spamControlCenter']; ?></a></legend>
---
> <legend><a href="javascript:void(0);" onclick="javascript:toggleConfig('Spam');"><?php print $PMF_LANG['spamControlCenter']; ?></a></legend>
</diff>

Thanks.

Thorsten
Posts: 15076
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Jump to top of page on Changelog click, PMF 2.6.5

Post by Thorsten » Sun Jun 13, 2010 11:41 am

Hi,

thank you very much, fixed for 2.6.6.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

Post Reply