1 (edited by mojorob 2014-03-17 19:56:51)

Topic: WordPress Plugin stops ability to scroll on Windows Phone 8

I'm using the wp-juicebox plugin activated on my wordpress site (v 3.8.1), and am also using the Foundation 5 framework. I've noticed that the site will not scroll on Windows Phone 8.0 Internet Explorer. I've disabled the juicebox plugin (as well as other plugins), and the site can be scrolled again so I've isolated to some issue between wp-juicebox and Foundation 5. This issue does not occur on an Android phone that I've tried, nor does it on an iPod touch.

The juicebox plugin version is 1.3.3.0 (which is the only version I can seem to download at the moment (according to the stable tag in the readme.txt) even though the relevant page on the Juicebox site has 1.3.3.1 in the version history).

Any idea why this might be causing a problem?

ETA: the scrolling issue is on all pages, not just where there is a gallery.

Re: WordPress Plugin stops ability to scroll on Windows Phone 8

I do not know why WP-Juicebox v1.3.3.1 is not currently available and why the download link leads to v1.3.3.0.
As far as I am aware, there are no issues with v1.3.3.1 which would have resulted in it being withdrawn for download.
I will look into this further.

However, there is no reason that I know of why a Juicebox gallery created and embedded in a WordPress page by WP-Juicebox v1.3.3.0 should prevent a page from scrolling.
When WordPress generates a page and comes across a Juicebox shortcode, it simply replaces the shortcode with the gallery's embedding code. In this respect, a Juicebox gallery in a WordPress page is no different to a Juicebox gallery in any other web page. (The only Juicebox-related code on the page is the <script> tag to load the 'juicebox.js' file and the embedding code itself.)

ETA: the scrolling issue is on all pages, not just where there is a gallery.

On a page without a Juicebox gallery, the only Juicebox-related code is the <script> tag to load the 'juicebox.js' file so it looks like there may be a JavaScript conflict of some kind.

Have you tried scrolling a web page with a Juicebox gallery (without WordPress or Foundation 5) on you Windows Phone?
Try loading these demo galleries, each of which have at least one Juicebox gallery embedded in a page which should be long enough for scrolling to be necessary to reach the bottom.
http://www.juicebox.net/demos/pro/embedded/
http://www.juicebox.net/demos/support/m … _one_page/

This should at least tell us if WordPress and/or Foundation 5 are contributing factors or if the problem is simply with Juicebox and your Windows Phone.

Re: WordPress Plugin stops ability to scroll on Windows Phone 8

Steven wrote:

Have you tried scrolling a web page with a Juicebox gallery (without WordPress or Foundation 5) on you Windows Phone?

Yes, those demos are fine - scrolling works.

The previous version of the site was on WordPress using the same Juicebox gallery - I've just updated the template to use Foundation 5 to improve the site on mobiles. Scrolling wasn't a problem before.  I'm holding off from using the Orbit slider in Foundation because Juicebox has better compatibility on older versions of IE (and I think Opera choked on Orbit as well when I tested).

I think this is probably an important but not urgent issue as there doesn't seem to be any visitors so far to the site in question using Windows Phone (just me!).  A Lumia 1020 has been my primary test device for the small screen layout.

Re: WordPress Plugin stops ability to scroll on Windows Phone 8

The link to WP-Juicebox (from the plugin's support web page) has now been fixed and points towards the current version (v1.3.3.1) so you could try upgrading WP-Juicebox to see if it helps.
Although there have been many changes between v1.3.3.0 and v1.3.3.1 (please see the version history for details) I do not think that there have been any code changes that will make a difference to the problem that you reported but it is certainly worth a try.

Re: WordPress Plugin stops ability to scroll on Windows Phone 8

Steven wrote:

The link to WP-Juicebox (from the plugin's support web page) has now been fixed and points towards the current version (v1.3.3.1) so you could try upgrading WP-Juicebox to see if it helps.
Although there have been many changes between v1.3.3.0 and v1.3.3.1 (please see the version history for details) I do not think that there have been any code changes that will make a difference to the problem that you reported but it is certainly worth a try.

Yeah, I checked just a short while ago and noticed it had changed.. but no, it makes no difference. Still no scroll on any page for my Windows Phone.

Re: WordPress Plugin stops ability to scroll on Windows Phone 8

I have thought of a workaround for this issue, however I will need to dequeue juicebox for Windows Phones in the theme functions file. I have a plugin that can detect if a Windows Phone is being used, however I'm trying to work out what handle I need to dequeue the Juicebox plugin, so I can then shortcode the relevant gallery page to use the Foundation 5 orbit slider.

Could you let me know what I need to dequeue the plugin? Thanks.

Re: WordPress Plugin stops ability to scroll on Windows Phone 8

The previous version of the site was on WordPress using the same Juicebox gallery - I've just updated the template to use Foundation 5 to improve the site on mobiles. Scrolling wasn't a problem before.

It sounds like the problem is likely to be a JavaScript conflict between Juicebox and Foundation 5 (or a bug in the Windows Phone browser).

WordPress has its own wp_is_mobile() function so if you wanted to prevent the 'juicebox.js' JavaScript file from being loaded on your pages, then you could open the 'wp-juicebox/wp-juicebox.php' file in a plain text editor and wrap line 28 in the wp_is_mobile() function (allowing add_action() to be run only if wp_is_mobile() returns false):

if (!wp_is_mobile()) {
    add_action('wp_enqueue_scripts', array(&$this, 'add_scripts_wp'));
}

If you have a more specific function which checks for a Windows Phone, then you could use this instead of wp_is_mobile().

With regard to the Juicebox shortcode which is already in the post, you would want WordPress to replace it with nothing (an empty string). Ordinarily, if you just disabled the add_shortcode() function on line 41 of the 'wp-juicebox.php' file (using the same method as above), then WordPress would simply display the Juicebox shortcode as plain text in the post.
In order to work around this, you would need to add the following to the very beginning of the shortcode_handler() function on line 219 of the 'wp-juicebox.php' file:

if (!wp_is_mobile()) {
    return;
}

Again, replace wp_is_mobile() with your own more specific function.

Re: WordPress Plugin stops ability to scroll on Windows Phone 8

Steven wrote:

If you have a more specific function which checks for a Windows Phone, then you could use this instead of wp_is_mobile().

Yeah, the plugin I referred to can detect type of phone too (Android, iOS, Windows). Late last night I managed to sort out juicebox being deregistered for Windows Phones, and put in a shortcode on the relevant page to show the gallery. I already had in place in the functions.php file to output any standard galleries as an Orbit slider.

This seems to have worked - I have scrolling back on my Windows Phone, and it shows the gallery as an Orbit slider. On other devices I've checked the Juicebox gallery is shown (which I would prefer to keep right now due to backward compatibility).

When doing this, a question did arise. Is there any reason why the Juicebox plugin doesn't use the native gallery shortcode and use that to output a Juicebox gallery?

Re: WordPress Plugin stops ability to scroll on Windows Phone 8

I do not know the original reason for giving WP-Juicebox its own shortcode but I guess it would allow for additional attributes to be added at a later date (perhaps for new functionality in future versions) without hijacking WordPress's own gallery shortcode.

Re: WordPress Plugin stops ability to scroll on Windows Phone 8

I've tried this out again using the WordPress plugin and the inability to scroll on WP8 is still happening.

Juicebox v 1.4.0.1, with the 1.4 version of jbcore pro.
Foundation 5.2.2

Re: WordPress Plugin stops ability to scroll on Windows Phone 8

Could you perhaps post the URL to a web page which demonstrates this problem so that we can take a look for ourselves?

Also, please try viewing this web page to see if the problem occurs with it. [Web page deleted.]
It is a web page which loads the Foundation 5.2.2 CSS and JavaScript files and also contains a Juicebox-Lite v1.4.0 gallery and some sample text (to ensure that the page is long enough to require scrolling).

Thank you.