Ticket #615 (new defect)

Opened 2 years ago

Last modified 1 year ago

javascript failed in Internet Explorer

Reported by: shuoshuo+trac@gmail.com Assigned to: coderanger
Priority: normal Component: CtxtnavAddPlugin
Severity: critical Keywords:
Cc: Trac Release: 0.10

Description

1. Background

2. Fix

  • ctxtnavadd.js
                        if(li_node.getAttribute('class') == 'last'
                            || li_node.getAttribute('className') == 'last') {
                            return(li_node);
                        }
    

Attachments

ctxtnavadd.js (1.1 kB) - added by kennethxu on 07/16/07 15:55:52.
fixed IE problem.

Change History

12/17/06 23:17:45 changed by dgynn

I can verify this fix solves the problem in IE. You also need to make a similar change to the code that resets the 'last' item's class.

     new_li.setAttribute('class','last');
     old_li.removeAttribute('class');
+    new_li.setAttribute('className','last');
+    old_li.removeAttribute('className');

06/12/07 03:24:18 changed by jason_field

I think there is a neater way to do it,

In find_old_last() instead of the getAttribute call;

if( li_node.className == 'last' ) {

and in add_ctxtnav() instead of the setAttribute call;

new_li.className = 'last'; old_li.className = ;

These changes seem to work on both IE and Firefox for me, and don't require doing essentially the same thing twice :)

06/12/07 23:19:22 changed by coderanger

I've totally rework the JavaScript? in the 0.11 version using jQuery. I don't really intend to backport these changes (as I am currently very lacking of free time), but if someone wants to make a backport patch, I'll take a look.

07/16/07 15:55:52 changed by kennethxu

  • attachment ctxtnavadd.js added.

fixed IE problem.

07/16/07 15:57:53 changed by kennethxu

I fixed this IE problem before I come to this ticket. file attached attachment:ctxtnavadd.js

Can somebody help to check into 0.10 branch?


Add/Change #615 (javascript failed in Internet Explorer)




Change Properties
Action