bug: please make data-tap-disabled attribute a toggleable attribute
Type: bug
Platform: ios 8 browser
Using Google Maps api, on iOS, there are problems incorporating html elements (specifically input) and making them clickable to enter text. If data-tap-disabled=true is used on the map itself, the map works normally but the elements are not clickable. If I don't use data-tap-disabled, then the elements are clickable but then the map will not get clicks (for markers etc).
Ionic code appears to travel the tree to determine if the tap is disabled anywhere and act accordingly. It would be very useful if you can turn this behavior off for child elements that need to gain focus by using data-tap-disable=false.
In my code, I've modified ionic so that the behavior is nestable so that on elements where it needs to be clickable, I use data-tap-disabled='false', while on the map itself, I have data-tap-disabled='true'. I modified the ionic code to do this in one routine, which I think will be beneficial to other users.
This appears occurs both in the phone browser and in a 'native hybrid' app, though I have not extensively tested the native app.
This appears to be an issue only using ionic on iOS
isElementTapDisabled: function(ele) {
if (ele && ele.nodeType === 1) {
var element = ele;
while (element) {
if ((element.dataset ? element.dataset.tapDisabled : element.getAttribute('data-tap-disabled')) == 'true') {
return true;
}
if (element.getAttribute('data-tap-disabled') === 'false') {
return false;
}
element = element.parentElement;
}
}
return false;
}</span>
<span is-issue-template></span>
Hey @celron, that should work. Can you put together an example of the issue in codepen or a project on github that we can test against?
Greetings @celron!
My sensors indicate a reply was requested, but we have not received one yet, I am using my robot powers to close this issue. However, if you are still experiencing this issue, please feel free to reopen it by creating a new issue, and include any examples or necessary information.
Thank you for allowing me to assist you.
Greetings @celron!
My sensors indicate a reply was requested, but we have not received one yet, I am using my robot powers to close this issue. However, if you are still experiencing this issue, please feel free to reopen it by creating a new issue, and include any examples or necessary information.
Thank you for allowing me to assist you.
Any chance we can get this merged?
The ability to switch on data tapping on child elements is pretty important for clicks in the infowindow in maps (which have to have ionic taps disabled because otherwise taps on markers stop working).