Closed
Description
PHP Version
8.2, 8.3
CodeIgniter4 Version
4.4.6
CodeIgniter4 Installation Method
Manual (zip or tar.gz)
Which operating systems have you tested for this bug?
Linux
Which server did you use?
fpm-fcgi
Database
Mariadb
What happened?
CI 4.4.6 : When clicking on Debug toolbar, the document is scrolled automatically to the TOP, as if someone had clicke an achor link to body tag.
Does not happen in 4.4.1, So I inspected the a href tags used (in both the CI versions) for the toggle buton of the debugtoolbar.
4.4.1 : <a id="debug-bar-link" href="**javascript:void(0)**" title="Open/Close">
4.4.6 : <a id="debug-bar-link" href="**#**" title="Open/Close">
I believe somewhere in the toolbar.js either return false is required, or preventdefault is to be used.
This can mess up with JS based routing as well I believe.
Steps to Reproduce
Switch to development mode :
- Create a Page that has content more than the window height so as to show scrollbars on right side.
- Scroll down to the bottom of the page.
- Click on the debugtoolbar toggle button.
It can be noticed that the page scrolls to the top.
Expected Output
Page position should remain as it is and should not scroll at all.
Anything else?
No response