Datepicker forces page jump
Hi
Then a user click on a datepicker field the calender is displayed and the browser jumps to the top of page. If have tried to remove the href attribute from the anchor tag, add return false, prevent default, all without luck.
Is there anyway I can resolve this, because it's very frustrating for the users.
Then a user click on a datepicker field the calender is displayed and the browser jumps to the top of page. If have tried to remove the href attribute from the anchor tag, add return false, prevent default, all without luck.
Is there anyway I can resolve this, because it's very frustrating for the users.
- Dmitry Kozlov
- Site Admin
- Posts: 1524
- Joined: Thu Jun 07, 2012
Hi,
Unfortunately, I cannot reproduce the issue, the calendar appears without page jumps. Is it the out-of-the-box date picker or you use a custom one? Have you tried to reproduce the issue on another form? Please, open the browser console and make sure that no errors appear when you open the calendar.
Unfortunately, I cannot reproduce the issue, the calendar appears without page jumps. Is it the out-of-the-box date picker or you use a custom one? Have you tried to reproduce the issue on another form? Please, open the browser console and make sure that no errors appear when you open the calendar.
- chris.cook
- Posts: 20
- Joined: Wed May 31, 2017
Hello Dmitry.
I've also come across this issue.
I've got experience in this, it only occurs in some browsers, and is due to the 'a' tag with an href property of #. Some browsers interpret this as an anchor to the top of the page, while others ignore it.
It is not a good way to implement this feature due to this browser inconsistency.
Safari on iPad and Chrome on android and windows 10 are examples of browsers which treat <a href="#"></a> as an anchor to the top of the page.
Since the functionality is bound to the element using the onclick property, simply changing from an a tag to a div or span and removing the href would solve the issue and retain all current functionality.
I've also come across this issue.
I've got experience in this, it only occurs in some browsers, and is due to the 'a' tag with an href property of #. Some browsers interpret this as an anchor to the top of the page, while others ignore it.
It is not a good way to implement this feature due to this browser inconsistency.
Safari on iPad and Chrome on android and windows 10 are examples of browsers which treat <a href="#"></a> as an anchor to the top of the page.
Since the functionality is bound to the element using the onclick property, simply changing from an a tag to a div or span and removing the href would solve the issue and retain all current functionality.
- Dmitry Kozlov
- Site Admin
- Posts: 1524
- Joined: Thu Jun 07, 2012
Hi Chris,
Please, try our replacement of default date and time pickers that should be much more user-friendly especially on mobile devices:
https://spform.com/custom-fields/proper ... kers-dates
Please, try our replacement of default date and time pickers that should be much more user-friendly especially on mobile devices:
https://spform.com/custom-fields/proper ... kers-dates
-
- Information
-
Who is online
Users browsing this forum: No registered users and 4 guests