Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iPhone X: incorrect touch handling with cordova-plugin-statusbar #1874

Closed
goodsoft opened this issue Nov 11, 2017 · 21 comments
Closed

iPhone X: incorrect touch handling with cordova-plugin-statusbar #1874

goodsoft opened this issue Nov 11, 2017 · 21 comments

Comments

@goodsoft
Copy link

I'm submitting a ... (check one with "x")
[ ] question
[x] any problem or bug report
[ ] feature request

If you choose 'problem or bug report', please select OS: (check one with "x")
[ ] Android
[x] iOS

cordova information: (run $> cordova plugin list)

com.googlemaps.ios 2.4.0 "Google Maps SDK for iOS"
cordova-plugin-googlemaps 2.1.1 "cordova-plugin-googlemaps"
cordova-plugin-statusbar 2.3.0 "StatusBar"

Current behavior:
When running on iPhone X simulator, map is displayed correctly, but touches are handled as if map was located 20pt higher.
That is, map plugin intercepts touches on elements just ahead of map, but doesn't react to touches on the lower 20pt strip of itself.

Expected behavior:
Touches should be handled correctly.

Related code, data or error log (please format your code or data):
Apparently, this part in src/ios/GoogleMaps/MyPluginLayer.m has hardcoded statusbar height:

    if (hasCordovaStatusBar) {
        UIApplication* app = [UIApplication sharedApplication];
        if (app.isStatusBarHidden) {
            point.y -= 20 * zoomScale;
        }
    }

Though, the behaviour of cordova-plugin-statusbar changed in these commits:
apache/cordova-plugin-statusbar@fff289c
apache/cordova-plugin-statusbar@cdc9295
apache/cordova-plugin-statusbar@c45331b

@wf9a5m75
Copy link
Member

Please create a demo project, and share it.
And please take a screen shot.
I have no plan to buy iPhoneX. So without cooperation with yours, this issue is not able to resolved.

@goodsoft
Copy link
Author

goodsoft commented Nov 12, 2017

I don't have physical iPhone X too, but this bug can be reproduced in simulator, which is bundled with latest Xcode.
I'll create a demo project and make relevant screenshots as soon as I deal with stuff of higher priority.

In the meanwhile it's possible that someone of higher acquaintance with the code of this plugin might figure out what needs to be changed to make it work.
To help this happen I have provided exact location of relevant code and links to the commits that break it.

@wf9a5m75
Copy link
Member

Since you don't give me any example, any screen captures, I'm not sure this commit is fixed as you want.
But the hack code should not be required anymore, because of #1875.
Please reinstall the plugin from the multiple_maps branch, and let me know the result.

@wf9a5m75
Copy link
Member

ping

@goodsoft
Copy link
Author

The bug is still there.
I'm trying to create a demo app to isolate this bug, but I'm not used to plain Cordova (we use rather convoluted build system), so it will take some time.

@wf9a5m75
Copy link
Member

Well, ionic is fine. Other frameworks are fine.
And at least you can take screen record how the plugin does not work.

@wf9a5m75
Copy link
Member

ping

@wf9a5m75
Copy link
Member

Since there is no enough information, I close this thread.

@shrijan
Copy link

shrijan commented Nov 22, 2017

     com.googlemaps.ios 2.5.0 "Google Maps SDK for iOS"
     cordova-plugin-googlemaps 2.1.2-beta-20171120-1931 "cordova-plugin-googlemaps"
     cordova-plugin-statusbar 2.3.0 "StatusBar"

https://youtu.be/sakHY2Dycwg

Map loads fine but overlay button when tapped doesn't react but zooms the map. This happens only after cordova-plugin-statusbar installed.

@wf9a5m75
Copy link
Member

wf9a5m75 commented Nov 22, 2017

Could you share the project files in a git repository? (bitbucket provides free private repo)

@wf9a5m75
Copy link
Member

If you share the project files on GitHub, I will check it tomorrow. Otherwise, I will do next week.
From tomorrow, I will take US holidays in this week

@shrijan
Copy link

shrijan commented Nov 22, 2017 via email

@wf9a5m75
Copy link
Member

Well, it's kind of too late.

@wf9a5m75
Copy link
Member

But I will try to find a free time.

@shrijan
Copy link

shrijan commented Nov 22, 2017 via email

@shrijan
Copy link

shrijan commented Nov 27, 2017

ping

@wf9a5m75
Copy link
Member

I can't understand what the problem is.
screen shot 2017-11-27 at 1 45 02 pm

@shrijan
Copy link

shrijan commented Nov 27, 2017 via email

@wf9a5m75
Copy link
Member

@shrijan Try the multiple_maps branch.

@wf9a5m75 wf9a5m75 removed the working label Nov 28, 2017
@wf9a5m75
Copy link
Member

1874

@shrijan
Copy link

shrijan commented Nov 28, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants