Opened 15 years ago

Closed 15 years ago

#3716 closed Bug (fixed)

Context menu disappears after displaying one submenu

Reported by: Damian Owned by: Frederico Caldeira Knabben
Priority: Normal Milestone: CKEditor 3.0
Component: General Version:
Keywords: IBM Confirmed Review+ Cc:

Description

Same issue as reported in #3566

Browser: IE7 OS: Vista

Attachments (3)

3716.patch (1.7 KB) - added by Martin Kou 15 years ago.
3716_2.patch (2.9 KB) - added by Martin Kou 15 years ago.
3716_3.patch (939 bytes) - added by Frederico Caldeira Knabben 15 years ago.

Download all attachments as: .zip

Change History (17)

comment:1 Changed 15 years ago by Martin Kou

Owner: set to Martin Kou
Status: newassigned

comment:2 Changed 15 years ago by Martin Kou

Keywords: Pending added

I've tested today's trunk with IE6/7/8 on both XP and Vista and I haven't been able to reproduce this bug.

comment:3 Changed 15 years ago by Damian

I have tested on today's nightly build with IE7 on Vista. The trick to reproducing this error is to use the Ajax sample.

Follow these steps:

  1. Open Ajax sample
  2. Add some text followed by a new table with default settings.
  3. Check the context menu on the table cells.
    3.1 Right click in a cell and hover over until cell properties appears
    3.2 Move over to the cell properties sub menu
  4. At this point the context menu should be visible
  5. Remove Editor
  6. Create Editor
  7. Repeat steps 2-4

The context menu will disappear.

comment:4 Changed 15 years ago by Martin Kou

Keywords: Confirmed added; Pending removed

Confirmed the bug on IE and Firefox.

comment:5 Changed 15 years ago by Martin Kou

The bug occurs whenever multiple editors have existed on the same page. A simpler way to reproduce this bug would be:

  1. Open replacebycode.html in any browser.
  2. Right click anywhere in the first editor to get a context menu.
  3. Add a default table in the second editor.
  4. Right click with the table selected in the second editor, and try to open any submenu.
  5. The parent context menu disappears.

I've noticed that there's duplicated event registration for the blur and focus DOM events in floatpanel plugin when there're multiple editors. But fixing that alone does fix the issue.

comment:6 Changed 15 years ago by Martin Kou

typo: fixing that alone does not fix the issue.

Changed 15 years ago by Martin Kou

Attachment: 3716.patch added

comment:7 Changed 15 years ago by Martin Kou

Keywords: Review? added

The problem here is that different editor instances would have created separate floatPanel instances, but they share the same iframe DOM nodes. So these creates two problems:

  1. The focus and blur handlers for the iframes are registered more than once when there're two or more editor instances.
  2. The "this" reference, or any variable references within the scope of a floatPanel instance, are no longer reliable in the focus/blur handlers.

comment:8 Changed 15 years ago by Frederico Caldeira Knabben

Keywords: Review- added; Review? removed
Summary: Context menu disappears after displaying one submenu in IE7 on VistaContext menu disappears after displaying one submenu

I'm not sure this is a problem related to the fix, but when following the steps defined in comment:3 the first level context menu is not getting closed when clicking in the editing area after showing a second level menu. This happens only on the second time we create an editor instance.

Changed 15 years ago by Martin Kou

Attachment: 3716_2.patch added

comment:9 Changed 15 years ago by Martin Kou

Keywords: Review? added; Review- removed

The fix did not cause the problem - it's that we're having the same instance variable synchronization problem with onHide and focused.

comment:10 Changed 15 years ago by Frederico Caldeira Knabben

Keywords: Review- added; Review? removed

This patch is breaking the panel based toolbar elements, like the color selectors:

  1. Click a color button.
  2. Click on the editing area to close it. (The button will stay blue).
  3. Click the button again to open it. (Nothing happens).

comment:11 Changed 15 years ago by Frederico Caldeira Knabben

Owner: changed from Martin Kou to Frederico Caldeira Knabben
Status: assignednew

It looks like we just need a flag there, to avoid executing the hiding code when it's not needed. I have a new patch for it.

Changed 15 years ago by Frederico Caldeira Knabben

Attachment: 3716_3.patch added

comment:12 Changed 15 years ago by Frederico Caldeira Knabben

Keywords: Review? added; Review- removed
Status: newassigned

comment:13 Changed 15 years ago by Martin Kou

Keywords: Review+ added; Review? removed

comment:14 Changed 15 years ago by Frederico Caldeira Knabben

Resolution: fixed
Status: assignedclosed

Fixed with [3693].

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