Opened 6 years ago

Closed 6 years ago

#1880 closed bug (fixed)

TinyMCE doesn't work in mobile (android - dolphin browser)

Reported by: pablobd Owned by: shevek
Priority: major Milestone: 1.6
Component: unknown Keywords:
Cc:

Description

I was trying to reply a forum post today from my android phone using dolphin browser. I think this also aplies to other forms using tinyMCE.

I can get to the reply page but TinyMCE won't be recognized as a textarea, I worked around this disabling javascript.

We need a way to disable tinyMCE by default when access is made with mobile device.

Change History (12)

comment:1 Changed 6 years ago by guaka

I'd go further and just disable tinyMCE by default anywhere.

comment:2 Changed 6 years ago by planetcruiser

adding a button that calls tinyMCE.execCommand('mceToggleEditor',false,'content'); should be easy to implement and will be a BIG relief for people on mobiles. see:

comment:3 Changed 6 years ago by shevek

Seems that the update to 3.5.8 fixed the toggle script as well. Adding the line globetrotter_tt mentioned in comment 18 in #1821 works now.

I'm not sure if the following is safe for all browsers but it worked fine in Chrome with NotScript? active.

<script>
  document.write('<p style="text-align: right">');
  document.write('<a href="javascript:;" onclick="tinymce.execCommand(\'mceToggleEditor\',false,\'topic_text\');">');
  document.write('<?php echo $words->getFormatted("forum_toggleTinyMCE"); ?></a></p>');
</script>

This would be needed for the blog posts as well.

comment:4 Changed 6 years ago by shevek

  • Milestone changed from unassigned to 1.6
  • Owner set to shevek
  • Status changed from new to assigned

Checked that the above code is working in IE10. Committed as: https://gitorious.org/bewelcome/rox/commit/ea72987f4490ba7386ece14d16c07da8886164d9

comment:5 Changed 6 years ago by shevek

  • Status changed from assigned to local_testing

Please test locally.

comment:6 Changed 6 years ago by shevek

The above doesn't work as some magic reputs the original text (before toggling) into the edit field on submit.

So the only viable way to get this done is a preference so that the editor doesn't get active at all (for SQL to add the preference see comment 8).

Commit: https://gitorious.org/bewelcome/rox/commit/759da8f5451bb2531af351488bdcdde9446df939

Last edited 6 years ago by shevek (previous) (diff)

comment:7 Changed 6 years ago by shevek

  • Summary changed from TiniMCE doesn't work in mobile (android - dolphin browser) to TinyMCE doesn't work in mobile (android - dolphin browser)

comment:8 Changed 6 years ago by shevek

Updated the code to use 'PreferenceDisableTinyMCE' to be in line with the other preferences.

INSERT INTO preferences( codeName, position, codeDescription, Description, DefaultValue, PossibleValues, 
STATUS ) 
VALUES (
'PreferenceDisableTinyMCE', 31,  'DisableTinyMCEDes',  'Disable TinyMCE',  'No',  'No;Yes',  'Normal'
)

Position the preference after advanced features.

Commit: http://www.gitorious.org/bewelcome/rox/commit/e87027095cf433c4d858e461c8a921997d243997

comment:9 Changed 6 years ago by shevek

Tested as part of #1963 by toub. Last commit was only a change of words. Ready for alpha.

comment:10 Changed 6 years ago by shevek

  • Status changed from local_testing to to_alpha

comment:11 Changed 6 years ago by shevek

  • Status changed from to_alpha to testing

comment:12 Changed 6 years ago by crumbking

  • Resolution set to fixed
  • Status changed from testing to closed

As we have a preference for this now there is no need for testing it on mobile. Thought if anyone wants to do that: switch off tiny and check.

But should be the same as in desktop browsers. Therefore I close this one.

Note: See TracTickets for help on using tickets.