Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Strange behaviour
This topic contains 4 replies, has 2 voices, and was last updated by multi_med 6 years, 12 months ago.
- AuthorPosts
- September 11, 2017 at 4:09 pm #14655
Hi, I’ve noticed strange behaviour of the plugin.
When I scroll to see the results of the search and I get to the end of the results, the box with results moves into the left of the screen and no other search is possible until I refresh the page.
What can be the problem?September 12, 2017 at 11:03 am #14660Hi!
It is because on page scrolling the menu gets hidden, and the results box is not longer able to find the search bar, so it is re-positioned.
Best,
There is an option on the back-end, which might help you. Try enabling this: https://i.imgur.com/Wxh1UQp.png
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
September 12, 2017 at 11:24 am #14661Hi, Thanks but that doesn’t work. I’ve enabled that option but still the results box diseapers somewhere. What’s worse the search doesn’t work after that.
September 12, 2017 at 11:42 am #14662Hi,
That is even worse, because it’s not solvable with any option or code within the search – as it is caused by the menu. The search simply gets removed from the DOM tree by the menu script, which also causes all the javascript handlers to be deleted. It does not simply hide the search node, but completely deletes it from the document, and it looks like, whenever I scroll back to the top it gets copied back.
Please check this video as proof. To prove it, I’m changing the ‘placeholder’ text to ‘TEST’ before I scroll down the screen. If the menu does not touch the search node, it will not change at all, and that is what should happen normally. But as you can see, it reverts back to ‘SZUKAJ…’, which means that the whole section is altered (probably replaced with a copy), resulting in loss of every previously attached event handlers – which breaks the search, or any 3rd party element that uses scripts for interaction: https://youtu.be/kRmR8Q3YHcU
This is a very bad practice, and it should not be used if possible – as it results in loss of attached script handlers. Unfortunately there is absolutely no way for the search to prevent this. I would suggest a solution if there was any, but it is not caused by the search itself, but by a script that alters the node structure of the header section.
Best,
You might have to ask the menu developer if this is something that can be turned off, or if there is any way for the menu to simply hide the elements, but not to make copies and change the header structure.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
September 12, 2017 at 3:26 pm #14670Hi, thanks. There was some option for sticky menu enabled which caused the problem. It’s fine now.
- AuthorPosts
You must be logged in to reply to this topic.