This project is archived and is in readonly mode.

#208 ✓invalid

Element.set bug on IE6

Reported by llafuente | December 8th, 2009 @ 12:33 AM

I describe the problem, is related to abbr and ie6.

An exception is raised because ABBR is not content editable so -> Element.isContentEditable is false.
IE 6.0.3790.3959 64bit

HTML: text
JS: $('abbr').set('html', 'changeText');

FIX (do not affect the rest of browsers)

    var html = {

    set: function(){
        var html = Array.flatten(arguments).join('');
        var wrap = Browser.Engine.trident && translations[this.get('tag')];
        if (wrap){
            var first = wrapper;
            first.innerHTML = wrap[1] + html + wrap[2];
            for (var i = wrap[0]; i--;) first = first.firstChild;
        } else {
            // add this new check
            if(this.isContentEditable === undefined || this.isContentEditable === true)
                this.innerHTML = html; // here is raised the exception

Comments and changes to this ticket

  • llafuente

    llafuente December 8th, 2009 @ 12:37 AM

    For some reason the abbr example was deleted by 'postman'

    i try to repeat it here a few with some extra '-'
    <-abbr- id="abbr">text<-/abbr->
    [abbr id="abbr"]text[/abbr]

  • Scott Kyle

    Scott Kyle January 12th, 2010 @ 05:47 AM

    • State changed from “new” to “invalid”

    Hi, this ticket was errantly filed under -more where it should be under -core. Would you please file it there and clarify how to reproduce this bug? Thank you.

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

The MooTools Extensions

People watching this ticket