Framework7: Disable ALL links before page slide and enable again after page slide (ios bug)

Created on 22 Sep 2016  ·  6Comments  ·  Source: framework7io/framework7

This is a (multiple allowed):

  • [x] bug
  • [ ] enhancement
  • [ ] feature-discussion (RFC)
  • Framework7 Version: v1.4.2
  • Platform and Target: ios 8, 9, 10 (problem happens on normal webkit AND WKWebview)

I have a problem that happens randomly only on ios for iphones and ipads. The problem happens when the user clicks on a page and the second page animates and load. The exact problem is that content from second page may appear on the first page as if the click on the first page was registered on the second page. The problem also happens when the user moves back from page 2 to page 1 via the swipe action. Sometimes, the whole app freezes, while other times content from the second page appear on the first page.

Based on my analysis, and since the problem ONLY happens right after the pages animations, I think it has to do with fastclick or may be the user clicking an item on the page WHILE it is sliding from right to left, or left to right. This should break the logic of my app as each link is supposed to be contained within a page with a context/parameters specific to that page.

So, as a temporary workaround I thought maybe if there is a way to disable links right before page animation and enable them again after the page completed the animation ? What is the proper way for achieving this ?

outdated

All 6 comments

Can you create a fiddle to reproduce the problem? http://www.jsfiddle.net
Also, a quick screencapture/video to visualize the problem would be great as your description is very vague.

Yeah an example would be helpful.
If this really is a bug it could be fixed easily.
A transparent layer before the site when animating the page transition and hiding it if new page has completely loaded.

I think I fixed the issue by defining a global disableLinks variable. This first is set to true right beforePageAnimation and set to false after any page completes its animation. I injected this global variable into every ajax call I have and also into the "preroute" method. If this variable is set to false, ALL links are disabled. It seems that this solution has solved the problem I described in my initial post as I was unable to reproduce the problem after introducing this solution.

Okay that's nice that you fixed your problem at your own :)

Would be good to close the issue

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mesutgok picture mesutgok  ·  4Comments

oVerde picture oVerde  ·  3Comments

iBinJubair picture iBinJubair  ·  4Comments

vousys picture vousys  ·  5Comments

yeli19950109 picture yeli19950109  ·  3Comments