Opened 16 years ago

Closed 16 years ago

#2438 closed Bug (duplicate)

tablehandler not operating on proper row - Context Menu js error

Reported by: Brad Anderson Owned by:
Priority: Normal Milestone:
Component: UI : Context Menu Version: FCKeditor 2.6
Keywords: Cc:

Description

It seems that in a <table> we are seeing the right-click context menu pop up for all rows except the last. Firebug is giving us an error on this line: http://dev.fckeditor.net/browser/FCKeditor/tags/2.6/editor/_source/internals/fcktablehandler.js#L274

Following the call stack down to http://dev.fckeditor.net/browser/FCKeditor/tags/2.6/editor/_source/internals/fcktablehandler.js#L302 got me wondering if that line should be

  var rowIdx = cells[0].parentNode.rowIndex - 1;

as rowIndex doesn't seem to be zero-based. This solved our problem.

A few notes:

  • /trunk is the same, no changes have been made since release 2.6.
  • I have only tested this fix on FF3 / OS X, and I'm not sure how it reacts with other browsers or OSes.
  • I'm not sure of other ramifications of this change if it's made.
  • If this issue is valid, where else does it need to be changed? I'll leave that as an exercise for the author. :)

Change History (3)

comment:1 Changed 16 years ago by Martin Kou

I can't reproduce the bug, with the newest 2.6.3 or with 2.6. Also, Quirksmode's test page indicates that rowIndex is indeed zero based.

Can you give a more detailed bug reproduction instruction for us to test out?

comment:2 Changed 16 years ago by Alfonso Martínez de Lizarrondo

I guess that the table has a thead so this is a dup of #1865.

Take a look at http://www.fckeditor.net/forums/viewtopic.php?f=11&t=10726 if you want this kind of bugs fixed (for example: until it's possible to add a thead this bug can't happen, so it doesn't have a high priority)

comment:3 Changed 16 years ago by Brad Anderson

Resolution: duplicate
Status: newclosed

yes, <thead> is present, so this seems to be a dupe of #1865.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy