jQWidgets Forums

jQuery UI Widgets Forums Lists DropDownList DropDownList selection fires "close" on parent window

This topic contains 2 replies, has 2 voices, and was last updated by  aorlic 12 years ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author

  • aorlic
    Member

    Hello!

    I have a very strange issue…

    A modaless window has a form with some fields, sliders, jqValidator and a DropDownList in it. When I change the selection in the DropDownList, the “close” event on the Window is called! The window itself is not closed, but the code in the corresponding event handler is invoked.

    The DropDownList is loaded via Ajax, has nothing special about it, rather than being validated before posting the form (not on selection!).

    I am wondering does this sound familiar to you?

    Thank you,

    Aleks.


    Peter Stoev
    Keymaster

    Hi,

    You should know that most of the events in JavaScript are Bubble events. This means that when an Inner HTML Elements raises a Bubble event it will pop up to the Parent HTML Element until the document, unless you call event.stopPropagation() or return false in an event handler.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com


    aorlic
    Member

    Thank you very much Peter, I really did not know it. 🙂

    So, I just need to call event.stopPropagation() from within the DropDownList “close” event…

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.