Page 1 of 1
findmore 2-click-like vs Modernizr.load
Posted: Wed Mar 28, 2012 12:48 pm
by yellowled
Weird, weird issue.
Recent versions of 2k11 use Modernizr.load, a ressource loader which loads CSS and/or JS based on Modernizr's test results. This is actually very useful since it enables 2k11 to only load certain JS (most likely polyfills) if it's actually needs them.
However, using Modernizr.load disables the 2-click-like-buttons optionally used by the findmore plugin for FB and G+ – but
only on Android devices.
So I assume some kind of weird counter reaction between plugin_findmore.js and Modernizr.load. Any ideas on where to even begin to debug this?
YL
Re: findmore 2-click-like vs Modernizr.load
Posted: Wed Mar 28, 2012 4:41 pm
by Don Chambers
I think they are both iframes.... could that be a clue?
Re: findmore 2-click-like vs Modernizr.load
Posted: Wed Mar 28, 2012 5:02 pm
by yellowled
Don Chambers wrote:I think they are both iframes.... could that be a clue?
Probably not. Both of them work fine in versions of 2k11 which don't use Modernizr.load. It has to have something to do with the plugin's JS and Modernizr.load.
YL
Re: findmore 2-click-like vs Modernizr.load
Posted: Wed Mar 28, 2012 7:05 pm
by garvinhicking
Hi!
Hm, when you edit teh findmore tpl and use '</' + 'iframe' to mask a closing '</iframe>' maybe that helps?
Else, maybe in the JS file of the plugin this:
Code: Select all
jQuery("script:last").parent().first().append($switcher);
jQuery("script:last").parent().first().append($dummy);
could be a problem. Also, using $ variables in JS might be a problem? Also, maybe one of the click events there might be the problem.
Have fun debugging, I don't have an Android.
Regards,
Garvin
Re: findmore 2-click-like vs Modernizr.load
Posted: Wed Mar 28, 2012 8:56 pm
by yellowled
garvinhicking wrote:Hm, when you edit teh findmore tpl and use '</' + 'iframe' to mask a closing '</iframe>' maybe that helps?
I'll have to check that.
garvinhicking wrote:
Code: Select all
jQuery("script:last").parent().first().append($switcher);
jQuery("script:last").parent().first().append($dummy);
I thought about that, too. But then again, both are appended properly. It's more likely the respective .click() statements present a problem, because obviously clicking does not work on Android. But how/why is this related to Modernizr.load …?
Also, the plugin's JS file uses $switcher.status and $switcher.active – I assume both should be $switcher.active? Also, the statement
Code: Select all
$switcher.active = ! $switcher.active
in toggleSwitcher doesn't have a ; – but I already checked those, and while they might be a result of hasty coding, they don't solve the issue.
garvinhicking wrote:Also, using $ variables in JS might be a problem?
Need to debug those as well. Might be, because of the noConflict stuff.
YL