Today I started playing with overlay extension and found a bug with closeOnClick option.
Line #174 is buggy because parents() function can work only with string selectors, not jquery (or dom) objects. Seehttp://stackoverflow.com/questions/245241/jquery-ancestors-using-jquery-objects#245266 .
So the solution is to replace line #174
Line #174 is buggy because parents() function can work only with string selectors, not jquery (or dom) objects. Seehttp://stackoverflow.com/questions/245241/jquery-ancestors-using-jquery-objects#245266 .
So the solution is to replace line #174
if (et.parents(overlay).length > 1) { return; }
with:if (et.parents().index(overlay) != -1) { return; }
Or, if we want to exclude overlay itself too, with:if (et.parents().index(overlay) != -1 || et[0] == overlay[0]) { return; }
