jquery/jquery-mobile — Issue #3046: closestEnabledButton() conflicts with OpenLayers
Author: jumpinjackie
Created: 2011-11-15 04:31:58+00:00
State: open

Using jQuery Mobile 1.0 RC3 with OpenLayers 2.11.

When I have a hover mouse over OpenLayers vector elements over a map inside a JQM page, I get errors saying that element.className.split is not a function at this line:

https://github.com/jquery/jquery-mobile/blob/master/js/jquery.mobile.buttonMarkup.js#L117

The element in question is an SVG element.

I was able to fix/workaround the problem by adding an extra test to see if element.className.split is a function

before:

cname = element.className && element.className.split(' ');

after:

cname = element.className && $.type(element.className.split) == 'function' && element.className.split(' ');