

The touch event will work with start, end and move, and just needs a value set (note that i didn’t test just setting it to
FIXED POSITION ON PAGE OS X WORD UPDATE
Touch event handler to get this value to update as the user is scrolling (or actually touching), so in javascript i can add: since the window isn’t scrolling, the content block is in an overflow, the values won’t change. note that as i’ve changed the css the body is no longer scrolling, so the 0 values on the left and right are So when i tried to apply this technique to theĮlement, the juddering was still visible, as the fixed element wasĪgain, those keen eyes might have spotted values are moving again. The trick would seem to be: make sure your fixed position element is however, that alone does not fix the juddering. If i change the css in my previous example, and set the height of myĪnd content block to 100%, then apply the scrolling touch property to the content, the juddering goes away. this is actually intended for inline blocks of content to the page (i mean inline with respect to the document). I don’t have a fix for this yet, and i suspect it’s a core painting issue inside of mobilesafari – but i will keep playing to see if there’s something that can be done. That although mobilesafari has painted the fixed element in place, it’s actually not there – the actual element remains in place until you touch and move the page again.

the user didn’t cause the scroll) the elements inside the fix element are unavailable.įrom the screencast i’ve recorded you can see using Show scrolling using javascript, the core problem is: if the page moves programatically (i.e. Scrolling = unusable position:fixed element You’re expecting exactly that kind of usage). this will only happen if the user has scrolled any amount (but if you’re using an input element, this can cause the entire fixed element to jump out of place. If there’s a focusable element inside the position fixed element, i.e. zoomed), the position fixed element drifts upwards (i’ve seen this drift entirely out of view before in other sites): If the page is zoomed at all, which you can get in ios when the user rotates from portrait to landscape, as the user scrolls in any scale beyond 1 (i.e. This is a problem if you want to monitor the page position to simulate effects like the bumping and shunting of category headings like you might see in the address book app. you’ll notice that the values don’t change (and another value which we’ll look at later).


The sharp eyed viewer might have spotted some values changing in the video. (using reflection) showing the same behaviour.
FIXED POSITION ON PAGE OS X WORD SIMULATOR
Note that this is the simulator running, but i’ve also captured the In any normal way as you might on a “desktop” site, you’ll see some degree of juddering as the page scrolls. however, there’s an increasing number of ios apps i’ve noticed that are actually just a collection of webviews (mini-mobilesafaris) with fixed position toolbars as seen in apple’s own appstore app, the native facebook app and instagram below:Īppstore facebook created a number of example pages that you can view for yourself, which are used in the following videos. I might have argued that fixed positioned doesn’t matter or isn’t really required in a good app. I’ve added “scrolling = unusable position:fixed element” based on corey duston pointing out
