jQuery UI Widgets Forums Layouts Docking Disable Escape Key Close Event

This topic contains 3 replies, has 2 voices, and was last updated by  tphan 9 years, 4 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • Disable Escape Key Close Event #67817

    tphan
    Participant

    Hello, is there a way to disable the escape key from closing the window? When hide the close button using the below but users can still close the window by hitting the escape key. Any help is appreciated. Thanks.

    $(‘#’+dockingId).jqxDocking(‘hideAllCloseButtons’);

    Tri

    Disable Escape Key Close Event #67951

    tphan
    Participant

    Hello, does anyone has feedback on this issue? Even though the close buttons are hidden using the below. The users can still close the panel by using the ESC key. Is there a way to disable usage of the ESC key to prevent users from closing the docking panel? Thanks.

    $(‘#’+dockingId).jqxDocking(‘hideAllCloseButtons’);

    Tri

    Disable Escape Key Close Event #67985

    Dimitar
    Participant

    Hello Tri,

    Here is how to disable this behaviour: http://jsfiddle.net/Dimitar_jQWidgets/0t6gpm8q/.

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

    Disable Escape Key Close Event #68042

    tphan
    Participant

    Hi Dimitar, thank you that works very well. For others who might be interested, i added this logic within a loop so that all my windows will have the ESC key disabled when the page is loaded.

    Tri

    // for each window id, override the esc key usage
    $.each($(‘.jqx-window’), function() {
    $(‘#’+$(this).attr(‘id’)).jqxWindow({
    keyboardCloseKey: ”
    });
    });

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

You must be logged in to reply to this topic.