jQuery Mobile panel smooth scrolling - jquery-mobile

This is not a question about JQM panels scrolling independently of the page, though that is an issue I've had trouble with and almost overcome, this is about making the panel scroll smoothly and ignore the device browser's edge event (or whatever the correct term is, I'll explain below).
Basically, I'm trying to replicate the menu on Google's mobile site, which naturally isn't using JQM like us common folk. I've got it pretty close, but the scrolling animation is very rigid. I need it be momentum-based rather than fixed to your finger.
Also, when you reach the top or bottom of the menu, it's considered the extremes of the document so the browser moves the whole document up or down to indicate the edge of the page. Instead, the page should never move while the panel is open and the menu should take on this behaviour within the panel.
Since I've set the panel height to 100%, this forces the address bar on iOS Safari to come down when the menu is open. This seems to be exactly what happens on Google, but if there's a way around this I'd love to hear it.
Finally, one downside of the way I've emulated independent scrolling is to just set the content wrap as fixed when the panel is open. However, this means the page always scrolls to the top when the panel opens. Any alternatives for this would be appreciated. I suppose I could just set the page top as scrollTop or something.
To summarise:
Panel menu needs to scroll smoothly (momentum rather than direct touch)
Elastic edge on menu rather than window
iOS Safari address bar interfering with height
Page fixed at top when panel open
If any of my descriptions don't make sense, just visit google.com on your phone and check out their menu.

ScrollFix seems to have solved all my issues.

Related

How to make the iOS bottom-sheet panel of Maps in react-native?

I am developing a react-native app. I'm trying to make a UI element similar to the one on Maps in iOS, in which you can slide a panel from the bottom.
The behavior of the list is quite complicated as:
You can't scroll down the list until the panel is fully open.
Trying to scroll it down makes the panel go up, and then if you continue the sliding movement on the screen the list starts scrolling.
And of course:
You can't slide the panel down until the list is at the beginning.
If you try to slide the panel down and the list isn't fully scrolled up, you end up scrolling the list to the beginning and then pulling the panel down.
The list scrolling up or down and the panel moving up or down has to be made in one movement. The user doesn't have to pull his finger out of the screen to make the second action. This is the actual hard part. Furthermore, it has to work on iOS and Android.
An example GIF of the iOS panel and the expected behavior.
The perfect module would be something like this, but the list is still scrollable even when it has reached the top: https://github.com/donaldmorton/react-native-bottom-drawer
I tried with this module without success:
https://github.com/simonhoss/react-native-touch-through-view
Something like that in react-native would be perfect:
How can I mimic the bottom sheet from the Maps app?
I already checked this post:
React Native slide out panel and scrollview
Any kind of help is welcomed, thank you!
You can see https://github.com/osdnk/react-native-reanimated-bottom-sheet.
It built from scratch with react-native-gesture-handler and react-native-reanimated

Google Search Assistant App browser on iPhone conflict with the bottom nav bar

I'm having an issue with the browser of the Google App on iPhone (known simply as "Google" in iTunes).
Background: on iPhone, both browsers (Google Search & Assistant and Safari) have a bottom nav-bar that appears/disappears as you scroll up and down a website page.
In any case, in many of my sites, I have a button in most pages, with position "fixed" to the bottom of the screen. In the Google browser, when I scroll up and down the page, this button appears/disappears and is replaced by the bottom nav-bar.
And when the bottom nav bar disappears and the button reappears, it is not clickable as it seems that there's an invisible layer that prevents it from happening. The "normal" behaviour in these cases seems to be for the bottom nav-bar to reappear. So, in fact, this button becomes "unclickable".
Now, when I try the same pages using Safari, the browser is "smart enough" to nudge the button up, keeping it clickable.
If you want to have a sense of this behaviour, you can find it in this page: https://www.avenuefive.com.
Why is this? Is this a bug of Google App? A feature that is not supported (fixed position)? Or something else altogether?

Openlayers-3 forEachFeatureAtPixel slightly offset

I'm currently using 3.6.0 and I'm finding that, as features are placed from left to right on the map that features further to the right seem to be offset from their icons - if I place my mouse directly over the graphic feature the mouse cursor (which is wired up to forEachFeatureAtPixel()) does not change until it is moved to the left of the feature icon. On the left of the screen they line up, but it drifts going right until features on the right are completely out of sync.
Any ideas? I thought it may be the library, but I've just rolled back to 3.4.0 and it was the same.
Could this be layout outside of the map canvas bumping items across the screen?
I had the same issue for about a month but in my particular case the problem originated because I was rendering the map while showing a loading panel in front of it wich had a style that caused the web browser to display the scrollbars.
Upon load completion, hiding the loading panel also removed the scrollbar but somehow the map itself didn't refresh properly.
All I had to do was to force map to recalculate the viewport size using the map.updateSize()
http://openlayers.org/en/v3.14.0/apidoc/ol.Map.html#updateSize

Delphi: Right aligned panel flickers upon resizing form

it should be simple but I don't find how to do it.
I create a form with a right aligned panel that I color in blue for example.
If I grab my forms left edge and resize it back and forth horizontally quickly, I would like the right panel not to move or flicker. As its position is unchanged, there is no reason why it should not stay completely steady. Does anybody know a simple trick to solve this apparently simple problem?
Thanks
This is just a fact of life with Windows GUI apps. You can see the same effect in a WinForms app and indeed even in mainstream Windows apps. For example, open an Explorer window and do exactly the same operation, resize by grabbing the left hand edge of the window. You will see exactly the same effect. You can see the same effect by resizing from any edge. Word and Excel behave in the same way.
My guess is that Windows repaints in the sizing loop before it sends the resizing message that allows the app to realign its controls.

Scrolling on iPad for an iframe within GWT window

PLEASE NOTE: This is not a "use two fingers to scroll" problem. Whether it is one finger, or two, or three, or the whole hand, for some reason our iframe does not scroll on an iPad. :)
Here is the scenario:
In our web application, which is built using EXT-GWT, we have a few windows that open as (maximized) pop-ups and present some forms to the users. These forms, which are most of the times external, are rendered in an iFrame and some of the forms have their content collapsed at the initial load - the user can choose to expand any section of the form, fill it in and submit. Now everything works fine except the scrolling in iPad. After the iframe's content is loaded and collapsed (collapsing is done using JS on the client side, basically, the content loads as expanded by default and then is collapsed by JS) iPad just fails to provide scolling to the iframe. Even after the content of the iframe is expanded the iframe does not get any scrolling.
As of now, we have solved this problem by increasing the height (using JavaScript) of the EXT-GWT window to the size of the expanded iframe body content. This makes the whole window scrollable, instead of just the iframe within the window. While it works, the window becomes way to big, so I was wondering if there is any better way for us to provide scrolling to the iframe.
Thanks for the help,
Nitin
For iOS devices you need set overflow: auto; or the scrolling won't work. For my web apps I used fancybox to display iframes modally and once I change the overflow setting in the css file the two finger scroll worked perfectly on the iPad.
After trying (almost) everything, I have come to the conclusion that increasing the GWT window height to the iframe.body.height is the only solution for getting the window/iframe to scroll on iPad. Hopefully, this will help someone in future.
I´m pretty new to GWT, but for me it worked like this:
The parent-div of the iframe has a class in my case, x-component.
I made an entry to my css file like this:
.x-component{-webkit-overflow-scrolling: touch; overflow:auto;}
It works as well if I set these entries not to the class, but to the div-element itself.
Hope that helps

Resources