stanmiller Active Member Licensed User Longtime User Mar 7, 2017 #1 I have an iPad running iOS 10 9.3.5. ABM.GetBrowserWidthHeight() is returning "0;0" StackOverflow: window.outerWidth is 0 in Safari on iOS 10 beta http://stackoverflow.com/questions/39416855/window-outerwidth-is-0-in-safari-on-ios-10-beta At stackoverflow, one poster suggested this alternative: Code: document.body.getBoundingClientRect().width Last edited: Mar 7, 2017
I have an iPad running iOS 10 9.3.5. ABM.GetBrowserWidthHeight() is returning "0;0" StackOverflow: window.outerWidth is 0 in Safari on iOS 10 beta http://stackoverflow.com/questions/39416855/window-outerwidth-is-0-in-safari-on-ios-10-beta At stackoverflow, one poster suggested this alternative: Code: document.body.getBoundingClientRect().width
alwaysbusy Expert Licensed User Longtime User Mar 7, 2017 #2 Please add it to the ABMaterial feedback app. Upvote 0
alwaysbusy Expert Licensed User Longtime User Mar 7, 2017 #3 If that is true, support for Safari in iOS 10 is going to stop for ABMaterial, and thousands of other frameworks. This must be a bug. Every framework uses window.outerWidth somewhere and I can (will) not make the changes in the dozens of js libraries because of one idiots decision. Upvote 0
If that is true, support for Safari in iOS 10 is going to stop for ABMaterial, and thousands of other frameworks. This must be a bug. Every framework uses window.outerWidth somewhere and I can (will) not make the changes in the dozens of js libraries because of one idiots decision.
stanmiller Active Member Licensed User Longtime User Mar 7, 2017 #4 I feel your pain. The iPad2 I spoke about in post #1 is actually running iOS 9.3.5. I also have an iPhone5 with 10.2.1. But like the iPad it reports window.outerWidth=0. I found this tool which compares methods for retrieving the client width live. Device and Viewport Size in JavaScript http://ryanve.com/lab/dimensions/ Here's the output for the iPhone5 Last edited: Mar 7, 2017 Upvote 0
I feel your pain. The iPad2 I spoke about in post #1 is actually running iOS 9.3.5. I also have an iPhone5 with 10.2.1. But like the iPad it reports window.outerWidth=0. I found this tool which compares methods for retrieving the client width live. Device and Viewport Size in JavaScript http://ryanve.com/lab/dimensions/ Here's the output for the iPhone5
alwaysbusy Expert Licensed User Longtime User Mar 7, 2017 #5 Yes, I read this bug is on iOS since iOS 8.0. So much for Apples quick fix reputation... Upvote 0
stanmiller Active Member Licensed User Longtime User Mar 7, 2017 #6 It does look like Safari is respecting the @media breakpoints. That's a good thing. So the exposure here may be only for those using ABM.GetBrowserWidthHeight() to make real-time adjustments to layouts. [ABMaterial] get small/med/large screen size https://www.b4x.com/android/forum/t...mall-med-large-screen-size.64825/#post-410476 Upvote 0
It does look like Safari is respecting the @media breakpoints. That's a good thing. So the exposure here may be only for those using ABM.GetBrowserWidthHeight() to make real-time adjustments to layouts. [ABMaterial] get small/med/large screen size https://www.b4x.com/android/forum/t...mall-med-large-screen-size.64825/#post-410476
alwaysbusy Expert Licensed User Longtime User Mar 8, 2017 #7 stanmiller said: ABM.GetBrowserWidthHeight() Click to expand... I'll use the jQuery version in the fix to this method, as it will probably catch most cases. Fingers crossed other external component libraries do not use the window.outerWidth() Upvote 0
stanmiller said: ABM.GetBrowserWidthHeight() Click to expand... I'll use the jQuery version in the fix to this method, as it will probably catch most cases. Fingers crossed other external component libraries do not use the window.outerWidth()