Support Forum

File Uploader and TinyMCE

RV Rias Van der Veken
Rias Van der Veken
Member

The File Uploader plug-in is causing a conflict with the TinyMCE Editor plug-in on my website.

The issue:

On touch screen devices I can’t focus the textarea again after closing the keyboard. This works perfectly with the file uploader plug-in disabled but when it is enabled again I can’t regain focus of the text area.

 

Is there a way to fix this conflict? Can I disable the file uploader just for touch screen devices? (phones and tablets)

 

Thanks in advance :)

36 Answers

New Answer

RV Rias Van der Veken
Rias Van der Veken
Member

The uploader also doesn’t work on mobile/touch devices, maybe this has something to do with it? It works perfectly on computers though :/

MP Mr Papa
Mr Papa
Member

We have no other reports of it having an issue on mobile devices…  Same for using tinymce….

We routinely use mobile devices as do many, many of our users…

Can you provide any more details? Are you using a mobile responsive wp and SP theme?

Image below uploaded on phone

 

2014-08-09-16.58.29.jpg
RV Rias Van der Veken
Rias Van der Veken
Member

I have a responsive theme but I have tried this with the Twenty Fourteen theme too and it’s the same issue. The only thing that fixes my textarea focus is disabling the file uploader plug-in.

I’m also using the Unified theme with the minimalistic color scheme.

 

It might be connected to the file uploader not working but I have no idea what would be causing that.

It’s a very strange issue as I know it works on your forums.

MP Mr Papa
Mr Papa
Member

are you getting any errors in the php error log?

MP Mr Papa
Mr Papa
Member

have you tried with multiple devices? or just one?  wondering if specific one…

do you have link to site?  can guests post?

RV Rias Van der Veken
Rias Van der Veken
Member

I’ve tested on an iPhone 5S and iPad, both physical devices and I’ve used the iOS simulators.

i don’t have any android phones so I have no idea if they have the same issues.

ive noticed I can’t use the file uploaded on this forum either on my phone.

as it’s not that important on mobile, is there a way I could disable it completely just for mobile phones and tablets?

 

I will set up an account tomorrow if you want to test, currently 3am here trying to fix it so going to call it a night

MP Mr Papa
Mr Papa
Member

We have tested here with multiple versions of iPad and iPhones… And other phones and tablets too… Cant say when last time was though not too long ago… The post made above was an android phone…

There is not an option to turn off on mobile devices… But, I believe it can be done via a filter… Not at computer currently (lol, on phone)… But will research and see…

MP Mr Papa
Mr Papa
Member

something like this should do the trick and might be overkill, but give it a try…

add_filter('sph_setup_forum', 'my_mobile_check');
function my_mobile_check() {
    global $spMobile, $spDevice;
    remove_filter('sph_topic_editor_toolbar_buttons',    'sp_plupload_editor_button', 5, 4);
    remove_filter('sph_post_editor_toolbar_buttons',    'sp_plupload_editor_button', 5, 4);
    remove_filter('sph_pm_editor_toolbar_buttons',    'sp_plupload_pm_editor_button', 5, 2);
    remove_filter('sph_topic_editor_footer_top',        'sp_plupload_uploader_form', 10, 3);
    remove_filter('sph_post_editor_footer_top',        'sp_plupload_uploader_form', 10, 3);
    remove_filter('sph_post_edit_footer_top',            'sp_plupload_uploader_edit_form', 10, 4);
    remove_filter('sph_pm_editor_toolbar',                'sp_plupload_uploader_pm_form', 10, 2);
    remove_filter('sph_SignaturesFormBottom',            'sp_plupload_uploader_sig_form', 10, 2);
}

now you will want to add in some checks before doing the ‘remove’…  $spMobile will be true for tablets or phones…  or you can check $spDevice which could be ‘desktop’, ‘tablet’ or ‘phone’…

RV Rias Van der Veken
Rias Van der Veken
Member

The code seems to just hide the uploader and not disable it from loading. It’s still having the same issue with the textarea.

I’ve created a test website and forum which is having the same issues, here’s a thread where guests can post: http://sp.webduivel.be/forum/algemene-discussies/test-thread/

The thread is made on my computer so you can see the upload is working fine on it.

If you need an account to check options/back-end I’m happy to give it.

MP Mr Papa
Mr Papa
Member

yes, that was the intention…  When I read your previous posts (and still read it the same) was under impression you could do posts until you tried to use the uploader, then things went south…

so are you now saying regardless of any activity, you simply cannot post on mobile?

did this post with an ipad3, btw just to see…

RV Rias Van der Veken
Rias Van der Veken
Member

Posting is possible, but if you close the keyboard and then try to select the editor again it doesn’t work.

Also, I know the editor works on your forum but the uploader doesn’t for me. It just doesn’t work on mine and I don’t know why.

The editor only works on mine when I deactivate the upload plug-in.

MP Mr Papa
Mr Papa
Member

odd… thought the issue was with uploading… we have no reports of such behavior…

wow, just looked at your site.. very nice custom sp theme you have there… well done!

and I do also notice that you that violates the wp standards… its loading an external version of jquery instead of the jquery library that comes with wp…

<script src=”http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js”></script>

in fact, you are loading that script twice…

so that could be the root of the problem…  I would first track down why loading two versions… and then see about using the jquery library that comes with wp… thats the only version that other plugins can expect and test with…