[more] Smiley popup window is blank on Apple iOS 9 devices

Started by dummuser, November 29, 2015, 11:19:19 AM

Previous topic - Next topic

dummuser

Hi SMF-Team!

the issue:
There is an issue, that opening the popup window for more smileys shows just a blank page on iOS 9 devices. This happens very frequently in a forum where I am just a user. A survey among other users turned out that almost all Apple friends (iOS 9) report this misbehavior. It happens on Safari, but also Chrome and Firefox, when installed on an iOS-9 iPhone or iPad. Only iPhone 4S (still 32Bit) seems to be OK. All other OS work fine (Windows, Android, iOS-8).

what happend until now...
The story has been tracked down a bit here in this Support case.
I installed a fresh SMF 2.0.11 on a brandnew XAMPP server and could reproduce and fix the problem.
The problem is 100% reproducible, even within a larger community of users.

my test environment:
Version of SMF: 2.0.11, no extra mods, no extra themes. One Smiley has been set to "popup".
Server is from XAMPP for Windows 5.6.14, Apache/2.4.17 (Win32) OpenSSL/1.0.2d PHP/5.6.14, database:  10.1.8-MariaDB

Fix:
I made a change on line 1488 of  \Themes\default\scripts\editor.js

before:
this.oSmileyPopupWindow = window.open('about:blank', this.opt.sUniqueId + '_addMoreSmileysPopup', ...blabla... );

after:
this.oSmileyPopupWindow = window.open('', this.opt.sUniqueId + '_addMoreSmileysPopup', ...blabla... );

The thing is with 'about:blank';. According to some javascript documentation, "_blank" is the default target anyway when this parameter is kept empty.
With this change it works fine on my test environment. Now I try to convince the admin of my favorite forum (where the stuff has been observed first) to do as well and have a field test.


Hope, that helps to track it down...

Kindred

that seems odd...   especially since - IMO - one should always DEFINE parameters, even if they are the default -- after all - there are some people who would want to CHANGE the parameter -- and how would they find it simply, if it was not defined?

Also, it seems very strange that iOS would choke on a default parameter
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

dummuser

Yeah, you are right.

What one can observe is, that the window seems to open properly for a split second, but then is replaced by a blank page.
Absolutely no idea why.

I keep you informed about the "field test" progress...  ;D

dummuser

I found something here:
http://stackoverflow.com/questions/33875455/using-document-write-in-an-opened-window-under-ios9 [nofollow]

they guy says:
QuoteWhen you open a new window with window.open [nofollow] the returned reference immediately has a document and using document write works without error. You can check the content etc. everything has worked. Then iOS decides to replace the document with a new one. Since we managed to successfully write in the first place we don't try to write again so users would see an empty page.

This guy has a code-example running here in a browser:
http://codepen.io/anon/pen/epapGL [nofollow]

It shows exactly the behavior of the Smiley popup window.
You can apply my above mentioned fix with leaving about:blank to this example and it cures also his code. Funny...

I tried to modify editor.js according to his idea (and not mine), but onlyy with limited success. Now sometimes the correct window appears on iOS 9 devices. But not always.

I must admit that my programming skills are limited, and I have to give up at this point...  :'(
Maybe this all gives you guys an idea wabout what is going wrong.



nend

Also if you want to use the WYSIWYG editor, which I use on my mobile device just fine.

Just change this in editor.js
this.bRichTextPossible = !this.opt.bRichEditOff && ((is_ie5up && !is_ie50) || is_ff || is_opera95up || is_safari || is_chrome) && !(is_iphone || is_android);

To
this.bRichTextPossible = !this.opt.bRichEditOff && ((is_ie5up && !is_ie50) || is_ff || is_opera95up || is_safari || is_chrome);

Maybe needs to check versions but mobile devices now days can handle all that just fine. SMF 2.0 is starting to show its age, needs a refresher in the compatibility layer as allot of stuff has changed in the outside world.

dummuser

Hi nend!

Thanks for that hint. Hasn't been an issue until now, but who knows...

dummuser

And now the result from our field test:
The admin of my favorite forum changed the line 1488 in editor.js and omitted the 'about:blank'; parameter.

And....
It Works!  :D :D :D

Took a while to sink through all iPhone chaches, which seem to be very effective (and probably part of the story?), but we get more and more post from happy users, that the smiley popup is back again.

For me the story is finished here.

Thanks guys for your help, and formthis nice piece of work, the forum software is.


dummuser

Good news!

With the new iOS 9.2 update from today, the problem is finally fixed. It is not necessary to change the "about:blank" any more.
So obviously, Apple had a bug in Javascript. The Release Notes say "Improved stability of Safari"...

Cheers & Goodbye!

Kindred

lol.... I am somewhat amused....


(and people call me mean and nasty when I try to tell them that OS or browser issues should really be fixed by the OS or browser)  O:)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

dummuser

Yeah, you are right!
So it was definitely worth for me that weekend to fly over to Mineta Int'l (fortunately they also fixed this ugly 60's style buildings), and sip a nice drink with Tim on the veranda of the Los Altos 18 hole. Just to convince him fixing that one damn thing in the flawless greens of iOS. Before chatting about business. And ladies, of course.

Advertisement: