Important Notice: We're experiencing email notification issues. If you've posted a question in the community forums recently, please check your profile manually for responses while we're working to fix this.

On Monday the 3rd of March, around 5pm UTC (9am PT) users may experience a brief period of downtime while one of our underlying services is under maintenance.

Támogatás keresése

Kerülje el a támogatási csalásokat. Sosem kérjük arra, hogy hívjon fel egy telefonszámot vagy osszon meg személyes információkat. Jelentse a gyanús tevékenységeket a „Visszaélés bejelentése” lehetőséggel.

További tudnivalók

A témacsoportot lezárták és archiválták. Tegyen fel új kérdést, ha segítségre van szüksége.

yui rich text editor problem

  • 3 válasz
  • 3 embernek van ilyen problémája
  • 1 megtekintés
  • Utolsó üzenet ettől: user1929

more options

with the last update, firefox quantum (version 57) the YUI rich text editor does not work anymore. I have reported the problem in a lot of our intranet reserved webapp, but you can test and reproduce the bug on this independent url (not under our control)

http://yui.github.io/yui2/docs/yui_2.9.0_full/examples/editor/simple_adv_editor.html

with the last update, firefox quantum (version 57) the YUI rich text editor does not work anymore. I have reported the problem in a lot of our intranet reserved webapp, but you can test and reproduce the bug on this independent url (not under our control) http://yui.github.io/yui2/docs/yui_2.9.0_full/examples/editor/simple_adv_editor.html

Összes válasz (3)

more options

Hi,

I'm able to reproduce this problem in Firefox as well. What's happening is that apparently when this library was written, the authors added special code for Firefox to work around a bug that was happening in Firefox 2 (which is from 2011). If you're interested, the specific code is here: https://github.com/yui/yui2/blob/067c9f82ecc90e4b392b7cb06a4a4f7fe3f6136e/src/editor/js/simple-editor.js#L1078 . This code uses a feature unique to Firefox that was disabled in Firefox 57 for increased security (https://blog.mozilla.org/security/2017/10/04/treating-data-urls-unique-origins-firefox-57/) . As a result, the editor is no longer working in Firefox.

You should be able to work around this by installing an addon like User-Agent switcher. Using the settings in this Addon, you can trick the text editor into thinking you're using another browser (like Chrome or Safari), which will make the text editor stop using the special workaround for Firefox. Let me know if this works!

The people who run your website should be able to fix this problem fairly easily by patching YUI's browser detection code. If you direct them to this thread, I can provide directions on how to do that.

more options

Can you gently inform me how to patch the code for firefox 57?

https://github.com/yui/yui2/blob/067c9f82ecc90e4b392b7cb06a4a4f7fe3f6136e/src/editor/js/simple-editor.js#L1078

With regards

more options

Sure! What you want to do is change the browser-detection code linked above to also detect Firefox, so that YUI will use the first code path instead of the second one. I think if you change this:

 if (this.browser.ie || this.browser.webkit || this.browser.opera || (navigator.userAgent.indexOf('Firefox/1.5') != -1)) {

to this:

 if (this.browser.ie || this.browser.webkit || this.browser.opera || this.browser.gecko) {

then it should work. Let me know if it doesn't.