Couple of issues - might be a bug - not sure

Get help using Construct 2

Post » Tue Feb 07, 2017 7:34 am

Hey guys,

I've discovered a couple of issues with both the built-in text box object (when set to "textarea" mode) as well as any of the iframe plugins (jessejoh or pode's versions).

If using just one/either/or/both of these objects in a project I have discovered the user can pinch/pull zoom on the site within these objects, thus causing some crazy undesirable results (like the layout trying to scale, failing to do so, then disappearing entirely off-screen).

To test what I mean, visit this test build site I'm working on - wait for it to load and click "next" to hit the "about" page. The text area can be zoomed in by doing a pinch/pull (*EDIT* seems to be only on default android browser only) on the standard C2 built-in text box object. Removing the iframe from my project makes no difference, I have tried that already. I'm using this iframe for a google map embed only, but it makes no difference if left in or not.

Anyone have any idea why the browser is allowing over-ride on zoom? I thought C2 was supposed to stop this from happening... though I have read recently that specifically in iOS that changes have been made to stop developers from being able to stop users from zooming (because it's apparently discriminatory - they'd rather break everyone's projects or pages that need zoom disabled in places). This is happening in android however... and on PC as well for that matter (if you hold CTRL and use the mouse wheel) it will do weird stuff.

Help please? Is this a bug that needs to be reported or am I doing something wrong (like usual?)

*EDIT*
Was able to test on an iDevice and it works as expected (no zooming/breaking) but is definitely a problem on the standard android browser. Will test in chrome on android and see if that's also an issue.

*EDIT 2*
It also works fine in chrome on android... it seems to be just the standard android browser that's broken :(

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
83
S
34
G
40
Posts: 3,032
Reputation: 30,474

Post » Wed Feb 08, 2017 12:31 am

Sorry to bug you @Ashley but do you know why the Text Box object (set to textarea mode) would allow ZOOM to happen but only in (default) ANDROID BROWSER?

It doesn't seem to be an issue in Chrome for Android, or on any iOS device.

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
83
S
34
G
40
Posts: 3,032
Reputation: 30,474

Post » Wed Feb 08, 2017 12:49 am

Does that use an iframe plug?
Image ImageImage
B
169
S
50
G
169
Posts: 8,288
Reputation: 108,220

Post » Wed Feb 08, 2017 12:57 am

No, it happens just with a project that has just the text box object set to textarea mode.

I haven't tried other modes, but the exact setting on the textbox I'm using are textarea mode, and it's enabled=false as well, and has CSS styling to make the background white.

It doesn't happen on Chrome for Android, or anything else... just the default "android browser".

iFrame plugin has this zoom problem with EVERY platform, but I asked in that plugin thread about that specifically. This issue is with the Text Box default C2 object.

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
83
S
34
G
40
Posts: 3,032
Reputation: 30,474

Post » Wed Feb 08, 2017 1:06 am

I saw the Google maps, and thought that might have something to do with it.
Image ImageImage
B
169
S
50
G
169
Posts: 8,288
Reputation: 108,220

Post » Wed Feb 08, 2017 2:47 am

Strangely enough, the google map DOESN'T allow zoom - where any other embedded content typically does. I guess the map has some fancy google code in there to stop pinch/pull zooming.

It's the strange behaviour of the text box object that's got me stuck. It's clearly a problem with the default android browser... but if it's an over-looked bug on behalf of team Scirra then hopefully Ashley can fix it. If not, it's not a MAJOR issue, but I can guarantee the first person who looks at the site will be using android browser and try to zoom in... smh lol!

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
83
S
34
G
40
Posts: 3,032
Reputation: 30,474

Post » Wed Feb 08, 2017 2:32 pm

Browsers have historically supported disabling pinch-to-zoom, and C2 does specify to disable that on export. However there are so many websites that disable zoom and yet have a tiny hard-to-read font, which annoys so many people (especially anyone without eagle-quality vision, which is more than most realise), that browser vendors are starting to ignore the "disable zoom" feature. This means these user-hostile websites become easy to read again, by ignoring the "disable zoom" instruction and letting the user zoom in anyway.

That's all a good idea, but the downside is it affects anyone who really doesn't want the page zoomable... like C2 content. It's a tricky issue because the browser only provides a crude "do the default thing" flag for touch events, and it can only be on or off. So if you drag in a text box, the default action may be to move the cursor or make a selection - and also start a zoom. Often we can't disable one but not the other. So we could forcibly disable the zoom, but then you might not be able to select anything in the text box. So this is probably something we need to go back and talk to browser vendors about.

FWIW the Android browser is falling out of use in favour of Chrome. Also I'm pretty sure Cordova is not affected, so mobile apps will stay the same. Anyway maybe post a minimal example to the Bugs forum and I'll look in to what could be done.
Scirra Founder
B
395
S
232
G
88
Posts: 24,371
Reputation: 193,772

Post » Thu Feb 09, 2017 2:12 am

Thanks for the reply @Ashley, I was leaning towards the fact it was a browser specific issue. You have now confirmed that, and I feel better because I thought it was me doing something wrong.

It would be nice to have some kind of "force off zoom" option, even if it means the user can't select the text box - because I guess in my particular instance that would suit just fine. Whether or not this is possible or even worth doing for such specific uses is another story, however I would personally find this feature repeatedly useful.

This whole "it's discrimination" is really a poor excuse IMO for these companies to take away some critical design decisions from developers - essentially forcing them to either live with a broken layout or figure out some other way of doing the job. Hopefully you can come to some understanding and agreement with the browser vendors regarding this. I'm still confused as to why there isn't an industry standard for a lot of these things... it would make everyone's job a lot easier!

Thanks again for taking the time to reply mate.

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
83
S
34
G
40
Posts: 3,032
Reputation: 30,474


Return to How do I....?

Who is online

Users browsing this forum: amazingdream, lordsas, mekonbekon and 53 guests