Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual bug in Safari using jQuery Mobile - Content duplication

I'm building a mobile app using jQuery Mobile 1.3.0, EaselJs 0.6.0 and TweenJs 0.4.0.

So, when I load the page, some content gets visually duplicated. The DIVs are not really duplicated, it is just visual.

  • This bug only appears on Safari (Windows + OSX).
  • If I click and slide to select the page, the bug disappears.
  • If I switch page (with jQuery Mobile slide transition), it also disappears.

Here is a screenshot:

Good and Bad screenshot examples

My code is massive so I cannot really post it fully here. I've just spent 2 hours playing around with my code to try to fix this. I really have no clue.

If you have an idea and need more information, then please let me know.

like image 519
Adrien A. Avatar asked Apr 12 '13 10:04

Adrien A.


People also ask

How do I use the Web Inspector with Mobile Safari?

Open the “Develop” menu and you should see an entry near the top showing the name of your device (for example, “Jeff’s iPhone”). Hover on this item so the menu slides open. The new menu will display all the tabs open in Mobile Safari and that the Web Inspector can be connected to. Click the item relating to the example app.

How do I use the Web Inspector to debug my App?

Before we can get started with using the Web Inspector to debug our app we must first enable both the iOS and OSX browsers for development. On your iOS device navigate to the Settings app and scroll down and select the Safari entry. Inside the Safari settings screen scroll to the very bottom and select the “Advanced” option.

How to enable develop menu in Safari?

Open Safari’s Preferences dialog by clicking the “Safari” menu item and selecting “Preferences”. Inside the Preferences dialog, go to the Advanced tab and then check the “Show Develop menu in menu bar” option at the bottom.


1 Answers

Not a pretty answer, but a workaround that worked for quite a few:

This sounds like a possible racing-condition, you can try setting a timeout(couple MS) when the page is loaded and then have it re-renderd after that timeout through switching display: none/block on the body.

like image 179
olsn Avatar answered Oct 03 '22 03:10

olsn