findmore 2-click-like vs Modernizr.load

Creating and modifying plugins.
Post Reply
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

findmore 2-click-like vs Modernizr.load

Post 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
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: findmore 2-click-like vs Modernizr.load

Post by Don Chambers »

I think they are both iframes.... could that be a clue?
=Don=
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: findmore 2-click-like vs Modernizr.load

Post 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
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: findmore 2-click-like vs Modernizr.load

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: findmore 2-click-like vs Modernizr.load

Post 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
Post Reply