Bug fix of the pull request (https://github.com/mapsplugin/cordova-plugin-googlemaps/pull/1504)
MODIFY
plugin.xml
plugin.xml
<?xml version='1.0' encoding='utf-8'?>
-<plugin id="cordova-plugin-googlemaps" version="2.0.0-beta2-20170623-1207" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
+<plugin id="cordova-plugin-googlemaps" version="2.0.0-beta2-20170623-1318" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
<name>cordova-plugin-googlemaps</name>
<js-module name="BaseClass" src="www/BaseClass.js">
<runs />

MODIFY
www/Common.js
www/Common.js
@@ -232,23 +232,44 @@ function getAllChildren(root) {
var allClickableElements = Array.prototype.slice.call(childNodes);
list = allClickableElements.filter(function(node) {
var tagName = node.tagName.toLowerCase();
- return node !== root && _shouldWatchByNative(node) &&
- ignoreTags.indexOf(tagName) == -1 &&
- ignoreClasses.indexOf(node.className) === -1;
+ if (node !== root &&
+ _shouldWatchByNative(node) &&
+ ignoreTags.indexOf(tagName) == -1) {
+
+ var classNames = (node.className || "").split(" ");
+ var matches = classNames.filter(function(clsName) {
+ return ignoreClasses.indexOf(clsName) !== -1;
});
+ if (matches && matches.length > 0) {
+ return false;
+ }
+ return true;
} else {
- var node, tagName;
+ return false;
+ }
+ });
+ } else {
+ var node, tagName, classNames, i, j, hit;
var clickableElements = root.getElementsByTagName("*");
- for (var i = 0; i < clickableElements.length; i++) {
+ for (i = 0; i < clickableElements.length; i++) {
node = clickableElements[i];
tagName = node.tagName.toLowerCase();
if (_shouldWatchByNative(node) &&
- ignoreTags.indexOf(tagName) == -1 &&
- ignoreClasses.indexOf(node.className) === -1) {
+ ignoreTags.indexOf(tagName) == -1) {
+ classNames = (node.className || "").split(" ");
+ hit = false;
+ for (j = 0; j < classNames.length; j++) {
+ if (ignoreClasses.indexOf(classNames[j]) > -1) {
+ hit = true;
+ break;
+ }
+ }
+ if (!hit) {
list.push(node);
}
}
}
+ }
return list;
}

Bug fix of the pull request (https://github.com/mapsplugin/cordova-plugin-googlemaps/pull/1504)