cordova-plugin-googlemaps icon indicating copy to clipboard operation
cordova-plugin-googlemaps copied to clipboard

Cannot press button in ionic header bar when header bar overlaps the map div (v2.0 beta)

Open JeffreyJamesAttenti opened this issue 9 years ago • 21 comments

I have an ionic app where I have a map div that only takes up a portion of the screen and the content is scrollable. I have a header bar which has buttons and when the user scrolls the screen, placing the map div beneath the bar, the user press events propagate to the map instead of the button.

I tried setting a z-index on the button and also on the element wrapping the button to try to get it to work but it did not fix the problem.

I created a github repo with a demo of the issue, https://github.com/JeffreyJamesMMM/OverlapMap

JeffreyJamesAttenti avatar Jun 12 '17 18:06 JeffreyJamesAttenti

Could you tellbme do you use ionic2 or ionic3?

wf9a5m75 avatar Jun 12 '17 23:06 wf9a5m75

I am using ionic 1

JeffreyJamesAttenti avatar Jun 13 '17 14:06 JeffreyJamesAttenti

Please share your project files on github or bitbacket.

How and why? #1479

wf9a5m75 avatar Jun 13 '17 21:06 wf9a5m75

The github link is in the original comment for the issue and here it is again: https://github.com/JeffreyJamesMMM/OverlapMap

JeffreyJamesAttenti avatar Jun 13 '17 21:06 JeffreyJamesAttenti

The link is 404

wf9a5m75 avatar Jun 13 '17 21:06 wf9a5m75

I'm sorry, I incorrectly formatted the markdown. https://github.com/JeffreyJamesMMM/OverlapMap should work!

JeffreyJamesAttenti avatar Jun 14 '17 13:06 JeffreyJamesAttenti

Thank you. I check it later. ( I have been traveling currently. Please wait for a while. I check issues one by one)

wf9a5m75 avatar Jun 15 '17 02:06 wf9a5m75

Thank you, Masashi!

JeffreyJamesAttenti avatar Jun 15 '17 13:06 JeffreyJamesAttenti

Thank you for waiting. I will check your project today.

wf9a5m75 avatar Jun 22 '17 16:06 wf9a5m75

Please uninstall the current plugin and reinstall the latest version.

wf9a5m75 avatar Jun 22 '17 20:06 wf9a5m75

Ok so I tried the latest version and I could press the button in the header when it overlaps the map BUT I can't press the map anymore.

JeffreyJamesAttenti avatar Jun 23 '17 16:06 JeffreyJamesAttenti

I can touch both map and the button. 1487

wf9a5m75 avatar Jun 23 '17 16:06 wf9a5m75

Ok. I tested it with genymotion (android os v4.4.4) and it didn't work but when I tried it on a samsung s5 (android os v5.0) it worked.

I just tested it on another physical device (android os v4.4.2) and it does not work. So I think it's an android v4.* problem.

JeffreyJamesAttenti avatar Jun 23 '17 16:06 JeffreyJamesAttenti

I see. I will check the code again after go back to my home.

wf9a5m75 avatar Jun 23 '17 16:06 wf9a5m75

I figured out the reason. I misunderstand the zIndex of the stacking context.

Please reinstall the plugin.

$> cordova plugin rm cordova-plugin-googlemaps

$> cordova plugin add https://github.com/mapsplugin/cordova-plugin-googlemaps#multiple_maps --variable ... --no-fetch

$> cordova plugin list
...
cordova-plugin-googlemaps 2.0.0-beta2-20170623-1615 "cordova-plugin-googlemaps"
...

wf9a5m75 avatar Jun 23 '17 23:06 wf9a5m75

Opps, sorry. I forgot to update the getZIndex() in Common.js yesterday. Please reinstall the plugin

$> cordova plugin rm cordova-plugin-googlemaps

$> cordova plugin add https://github.com/mapsplugin/cordova-plugin-googlemaps#multiple_maps --variable ... --no-fetch

$> cordova plugin list
...
cordova-plugin-googlemaps 2.0.0-beta2-20170624-1408 "cordova-plugin-googlemaps"
...

This is the screen record of Android 4.4

1487

wf9a5m75 avatar Jun 24 '17 21:06 wf9a5m75

iOS also worked with cordova-plugin-googlemaps 2.0.0-beta2-20170624-1408

1487

wf9a5m75 avatar Jun 24 '17 21:06 wf9a5m75

ping

wf9a5m75 avatar Jun 27 '17 16:06 wf9a5m75

Hello Masashi, I haven't been able to go back and try it but I will try it again sometime today or tomorrow for certain.

JeffreyJamesAttenti avatar Jun 27 '17 17:06 JeffreyJamesAttenti

Got it

wf9a5m75 avatar Jun 27 '17 17:06 wf9a5m75