Changeset [e67e02138a49a1077ba920a5db3a458de0b45f69] by Eric Anderson

March 30th, 2010 @ 02:21 PM

IE Error: Cannot send event to element with no parent.

When creating a menu on an anonymous element (i.e. the menu provides
the element not the caller) the close() being called was generating an error
in IE. The only things the close method did were:

  • Make the menu hidden (by adding a class)
  • Send an event for any listeners out there

Making the menu hidden is redundent as when the element is created it already
has the hidden class. Sending the event is a no-op. Since the element just
got created there would not be anybody listening for the event anyway.

Although in most browser this useless close was not causing any problems
in IE it was causing an error because IE does not allow events to be sent
to a element that does not have a parent. See issue #38 on the prototype
issue tracker for more info on this issue.

This patch resolves the problem by have the close method not be called.
Removes some useless execution and avoids the IE issue completely.
http://github.com/madrobby/scripty2/commit/e67e02138a49a1077ba920a5...

Committed by Eric Anderson

  • M src/ui/controls/menu.js
New-ticket Create new ticket

Create your profile

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

http://github.com/madrobby/scripty2