sleemanj / xinha

WYSIWYG HTML Editor Component (turns <textarea> into HTML editors)
http://trac.xinha.org/
Other
13 stars 2 forks source link

IE9 Fix (Trac #1581) #1581

Closed sleemanj closed 3 years ago

sleemanj commented 13 years ago

XinHaCore.Js

1. approx line 1610
    function noselect(e) {
        if (e.tagName) {
            e.unselectable = "on";
        }
        if (e.childNodes) {
            var imax = e.childNodes.length;
            for (var i = 0; i < imax; i += 1) {
                if (e.tagName) {
                    noselect(e.childNodes[i]);
                }
            }
        }
    }
2.
approx Line 6284
  Xinha._stopEvent = function(ev)
  {
    if (ev.preventDefault)   { //add
        ev.preventDefault();
    }
    if (ev.stopPropagation){ //add
        ev.stopPropagation();
    }
  };

Reported by guest, migrated from http://trac.xinha.org/ticket/1581

sleemanj commented 13 years ago

Thanks, that worked for me.

sleemanj commented 13 years ago

Commited (something like it) in changeset:1314

Leaving ticket open so it's easy for people to find this.

XinHaCore.Js

  1. approx line 1610 function noselect(e) { if (e.tagName) { e.unselectable = "on"; } if (e.childNodes) { var imax = e.childNodes.length; for (var i = 0; i < imax; i += 1) { if (e.tagName) { noselect(e.childNodes[i]); } } } }
  2. approx Line 6284 Xinha._stopEvent = function(ev) { if (ev.preventDefault) { //add ev.preventDefault(); } if (ev.stopPropagation){ //add ev.stopPropagation(); } };

to:

XinHaCore.Js

1. approx line 1610
    function noselect(e) {
        if (e.tagName) {
            e.unselectable = "on";
        }
        if (e.childNodes) {
            var imax = e.childNodes.length;
            for (var i = 0; i < imax; i += 1) {
                if (e.tagName) {
                    noselect(e.childNodes[i]);
                }
            }
        }
    }
2.
approx Line 6284
  Xinha._stopEvent = function(ev)
  {
    if (ev.preventDefault)   { //add
        ev.preventDefault();
    }
    if (ev.stopPropagation){ //add
        ev.stopPropagation();
    }
  };
sleemanj commented 13 years ago