Hi Arminunruh,
Thank you for your reaction and proposal. In compatibility mode, I had some other weird behavior, so I could point the error to a custom plugin. After disabling the plugin the back button works again, and support in the plugin for the ajax event (https://laytheme.com/documentation/custom-javascript.html#newpage-events) also solved the event in the plugin.
CasperK
Posts
-
Back button in mobile browser does not reload the previous page -
Back button in mobile browser does not reload the previous pageHi Lay Theme devs,
Since a few weeks we encounter a strange problem on our website. We are using Lay theme and the Carousel plugin. The back button on mobile browsers does not refresh the page. It does set the address of the previous page, but does not go back to that page. This only happens when the website is shown on mobile phone layout, in desktop mode the behavior is normal. It happens on mobile devices, but I can also reproduce this behavior on a desktop browser (Firefox), when showing mobile device dimensions.
To reproduce the problem, visit https://pakhaus.nl/collectie/. Then in mobile phone layout click on an item in the grid with images. First an overlay with text is shown, tap again and the next page is shown. When the back-button of the browser is pressed, the address bar shows the previous address, however the page is not reloaded. When I refresh manually, the page is reloaded and shows the correct content.
-
Clicking on search suggestions not workingI fixed the issue on the main website, but on the test site I reverted the modification. You can check the problem here: https://new.pakhaus.nl/
-
Clicking on search suggestions not workingHello, thank you for your reply.
I want to fill the text from the suggestion in the search input. This often doesn't work.
The problem is when I try to click a suggestion the blur event from the search input hides the suggestions before the click event is handled. So only when the click event is triggered within 100ms it works. I see that blur only works on inputs, not on div elements, so maybe the delay for hiding must be longer.
-
Clicking on search suggestions not workingIn the Lay Theme, after typing a few letters in the search input, a list with suggestions is shown. It is however almost impossible to select the text from the suggestions by clicking, because the list is hidden before the click event is handled.
A solution to make it work is to register the blur even not on the input, but on it's parent. So instead of:
events: {
"input #search-query": "onInput",
"focus #search-query": "onFocus",
"blur #search-query": "onBlur",
"click .close-search": "onHide"
},
The blur event can be set on the .search-inputs selector:
events: {
"input #search-query": "onInput",
"focus #search-query": "onFocus",
"blur .search-inputs": "onBlur",
"click .close-search": "onHide"
},This way the blur event only occurs when the focus of all the search components is lost. Clicking on the suggestions will not trigger the blur, which in my opinion should not be done as the suggestions are part of the search input.