-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: Debugbar Click(toggle) Scrolls Document to Top #8594
Comments
Forgot to mark the code with the proper format : Please see below for missing content above. |
I checked those 2 places and the toggle button works fine after removing the href attribute in the anchor tags. The problem is that that entire tpl is full of <a href with # in value. So anywhere in the toolbar when any link(like Vars, Views, theme toggler etc) is cliked, the unwanted behavior happens. I believe all instances of href="#" will need to be removed. |
Uploading 2 changed files that seems to work for me. Please check if this fixes the issues without any unexpected results. |
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.
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 :
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
The text was updated successfully, but these errors were encountered: