iFrame Text Field Always Visible in Safari

Special forum to share and discuss skins for Pano2VR and Object2VR
Post Reply
User avatar
Tony
Posts: 225
Joined: Mon Feb 15, 2010 6:54 am
Location: Adelaide, South Australia
Contact:

iFrame Text Field Always Visible in Safari

Post by Tony » Fri Jul 07, 2017 1:41 am

Hi,

An iFrame text field, regardless of it's visible status, is always visible in Safari after the project loads. macOS Sierra V10.12.5 | iMac | Safari Version 10.1.1 (12603.2.4) and iPad Air iOS 10.3.2.

You can view the project here http://tonyredhead.photography/P2VR/Ski ... index.html

Image
The image above shows the initial screen on Safari on the iMac.

Image
The image above shows the correct view on Safari after clicking on the 'Cruise News' hotspot button below the transparent text field.

The issue doesn't happen on Chrome or Firefox on the iMac and iOS.

Image
The image above shows the initial screen on Chrome on the iMac.

Image
The image above shows the popup on Chrome after clicking on the 'Cruise News' hotspot button

I've been using a lot of iFrame Text Fields in my projects but this is the first time I've run across this issue and it's got me baffled and I've tried a number of different settings.

The container it resides in has it's visibility unchecked and is made visible by a variable in a logic block activated by a button attached to the hotspot. The text field has its visibility checked, but even if I uncheck it, so it never appears in Chrome or Firefox, it still shows up in Safari. So even if it's completely hidden it displays!

I've found a work around and that is to set the Alpha of the text field to 0 and when the hotspot sets the visibility of the container to true the alpha of the text field is set to 1. However I can't figure out why it worked in other projects and not this one.

You can download a zip of the project at http://tonyredhead.photography/P2VR/Ski ... -Issue.zip and I've attached the skin.

Any insight would be appreciated.

Tony
Attachments
iFrame-Issue.ggsk
(26.93 KiB) Downloaded 16 times
Tony Redhead | Panoramic Photographer | mobile: +61438501002 | website: http://tonyredhead.com - http://redsquare.com | google+: http://google.com/+tonyredhead

User avatar
Hopki
Gnome
Posts: 7552
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Re: iFrame Text Field Always Visible in Safari

Post by Hopki » Fri Jul 07, 2017 1:23 pm

Hi Tony,
This is because the text box has the iframe code in the text area.
This will pull in the frame regardless if the text box is visible or not.

What you need to do is have the text box blank and hidden.
The hotspot then needs to show the text box and set the value to it, the value being the iframe to pull in the content.
On close you need to unload the iframe, you do this by setting a "blank" value to the text box and then hide it.

What I would do is in the point hotspot is have the iframe in the hotspot description text field. Then in the hotspot template as an example have mouse click, set value, $hd, target, text1.

The other smart way would be to use a variable and logic blocks.
Again as an example so set a numbered variable in the skin called pop_iframe, with starting value 0.

The text box which is set to hidden (deselect visible):
Set a visible logic block: *pop_iframe > 0 visible true

Then under the text logic block set:
*pop_iframe > 0 text box blank
*pop_iframe > 1 text box iframe (your first iframe)
*pop_iframe > 2 text box iframe (your second iframe)
and so on.

Have a close button or set the action to the text box.

Mouse click Set variable value to 0


Then have a Hotspot template with the action, mouse click set variable value $hd

Then in all your hotspot description text field you can just have the number, 1, 2, etc.

As the variable is set to say 2, as the variable is > 0 the text box will show and the iframe in condition 2 will be displayed and you will see the content.
When the close button is clicked the variable goes back to 0 so unloads any text and the text box will hide.
This way the text box has all the iframes pre programmed and all your doing is using a logic block to select one.

Regards,
Hopki

User avatar
Tony
Posts: 225
Joined: Mon Feb 15, 2010 6:54 am
Location: Adelaide, South Australia
Contact:

Re: iFrame Text Field Always Visible in Safari

Post by Tony » Sat Jul 08, 2017 2:44 pm

Hi Hopki,

Thanks for the feedback.
This is because the text box has the iframe code in the text area.
This will pull in the frame regardless if the text box is visible or not.
I'm not sure how I implemented it before but at least the action is common to all the iFrames so it should be easier to resolve.
What I would do is in the point hotspot is have the iframe in the hotspot description text field. Then in the hotspot template as an example have mouse click, set value, $hd, target, text1.
How does this work with multiple versions of the same iFrame code. I'm using a variation for each language, English, French and German. The text box has a logic block using the Lang variable and en, fr, de.

In the second example using logic blocks, where do I add the three versions of the iFrame text?

As I mentioned earlier I got around the issue by using modifying the Alpha value of the text box. An example is online at http://expedition.photography/BrownBluff

cheers,

Tony
Tony Redhead | Panoramic Photographer | mobile: +61438501002 | website: http://tonyredhead.com - http://redsquare.com | google+: http://google.com/+tonyredhead

User avatar
Tony
Posts: 225
Joined: Mon Feb 15, 2010 6:54 am
Location: Adelaide, South Australia
Contact:

Re: iFrame Text Field Always Visible in Safari

Post by Tony » Sun Jul 09, 2017 3:55 am

Hi Hopki,

All good, I took a look at your post viewtopic.php?f=13&t=10913 and it made it much clearer. I've done a test using one of the components from the project and the iFrame isn't showing up in Safari and the alternate languages work perfectly.

http://panos.expedition.photography/Saf ... index.html

cheers,

Tony
Tony Redhead | Panoramic Photographer | mobile: +61438501002 | website: http://tonyredhead.com - http://redsquare.com | google+: http://google.com/+tonyredhead

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests