Issue Details (XML | Word | Printable)

Key: MDL-16336
Type: Bug Bug
Status: Open Open
Priority: Critical Critical
Assignee: Mathieu Petit-Clair
Reporter: Tariq Adel Ebrahim
Votes: 14
Watchers: 14
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

HTMLAREA HTML editor doesn't appear in Google Chrome

Created: 04/Sep/08 03:05 PM   Updated: 02/Sep/10 11:09 PM
Component/s: HTML Editor
Affects Version/s: 1.6.7, 1.7.5, 1.8.6, 1.9.2
Fix Version/s: None

File Attachments: 1. Text File chrome.patch (2 kB)
2. Text File htmlarea-with-webkit-browsers.patch (2 kB)

Environment: Google Chrome web browser

Participants: Brent Lee, Dan Leighton, Dan Poltawski, Genner Cerna, Jonathan Harker, Mathieu Petit-Clair, Mauno Korpelainen, Tariq Adel Ebrahim and Wen Hao Chuang
Security Level: None
Affected Branches: MOODLE_16_STABLE, MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE


 Description  « Hide
When viewing a page with the new Google Chrome web browser that contains the html editor (htmlarea) the html editing features don't appear; instead, a text box is displayed.

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Tariq Adel Ebrahim added a comment - 04/Sep/08 03:06 PM

Mauno Korpelainen added a comment - 04/Sep/08 08:44 PM
It might be even possible to get latest version of Opera and Safari to render htmlarea properly by changing those functions that Tariq mentioned and tiny changes to code of htmlarea.php and css. I can confirm that Chrome works nicely with TinyMCE, FCKEditor, Xinha and also with htmlarea (at least most parts of htmlarea). I got also Opera 9.5 to render htmlarea with some possibly minor issues and the main problem with latest Safari is that toolbar is not fully visible (css) - otherwise htmlarea seems to be "almost functional" in Safari.

Tariq Adel Ebrahim added a comment - 05/Sep/08 02:13 AM
Patch to detect 'Chrome' in $_SERVER['HTTP_USER_AGENT'] (./lib/moodlelib.php::check_browser_version()) and more or less the same thing done in ./lib/editor/htmlarea/htmlarea.php

Dan Poltawski added a comment - 05/Sep/08 05:52 AM
Are you 100% sure all editor functions work with chrome?

It is based on the same rendering engine as safari (though different js engine) so, its not unresonable to think that many things might be broken and it would be an unwise choice to enable it.

The current editor has many bugs and I think its wise to be catious about enabling this new functionality - Matt is fixing it once and for all by getting rid the current buggy editor in 2.0.


Mauno Korpelainen added a comment - 05/Sep/08 06:58 AM
I'm 100% sure that all editor functions don't work with Chrome - how could they? Chrome & HTMLArea have similar bugs as other browsers and for example Dragmath plugin can be used with upgraded version of Java but equations are not posted to textarea, focus may sometimes get lost and so on. Like most other browsers Chrome has some personal shortcut keys so most Editor Shortcut Keys of HTMLArea don't work either. Although all basic buttons and features seem to work ok on my test site they should be tested on all environments - the current Chrome was released for Windows and they used components both from Apple's WebKit and Mozilla's Firefox.

Still what do we loose if editor is enabled for Chrome? Button <> works well and it may be too optimistic to think that even Matt could fix it once and for all by getting rid the buggy editor in moodle 2.0. It's more likely an never ending story...new versions of editors and browers will always have bugs.


Dan Leighton added a comment - 15/Jun/09 09:14 PM
This patch no longer seems to work with 1.9.5

Any ideas please anyone?

Many thanks


Wen Hao Chuang added a comment - 10/Dec/09 08:51 AM
Anyone tried to test the patch with 1.9.7? I suppose that it won't work for 1.9.7 either? Just curious, thanks!

Mauno Korpelainen added a comment - 11/Dec/09 07:57 AM
I don't know what Dan Leighton exactly ment but all basic features of HTMLArea seem to work with the latest moodle 1.9.7+ and Chrome. I did not test 3rd party plugins.

There are just tiny css issues like button background color is a little darker in Chrome than in IE and FF but such things could be easily fixed by setting the background to some exact color instead of buttonface in lib/editor/htmlarea/htmlarea.css .

Probably Dan had some problems with editing moodlelib.php and extra white spaces etc.

Because current Chrome is handy and fast - much better than year ago - and also versions for Mac and Linux are available http://chrome.blogspot.com/2009/12/google-chrome-for-holidays-mac-linux.html it might be time to let Chrome run with lightning speed on moodle sites by default


Genner Cerna added a comment - 05/Mar/10 03:28 PM
same here, editor is not working in google chrome

Jonathan Harker added a comment - 24/Aug/10 11:40 AM
Hi there - I think it is better to check for the "AppleWebKit" version rather than the presence of the string "chrome" in the user agent. This will not only pick up Chromium but also a bunch of minority and mobile phone browsers that can cope fine - e.g. Konqueror, Safari, Symbian S60, Palm Pre, and so on, and ensure the correct version of WebKit. See attached patch.

In testing I found Safari < 4.0 to not work with the textarea resizing, which is AppleWebKit < 528.16

Cheers, J


Brent Lee added a comment - 02/Sep/10 11:09 PM
Has anyone used this patch on 1.9.9+ ?