jQuery UI Widgets Forums Dialogs and Notifications Window Window Close CallBack firing

This topic contains 1 reply, has 2 voices, and was last updated by  Hristo 8 years, 1 month ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Window Close CallBack firing #86675

    kalel16
    Participant

    I am using jqxWindow angular directive. I see a strange behaviour when i run the below code in my application. when i close the dialog using a button event handler. the event is firing twice….however when i run the sample below like in Test HTML page the event only fires once….

    the event is firing twice in application. i looked at the entire code and i don’t see the same event handler used anywhere….this is driving me nuts :)….. have you come across this issue before?

    <!DOCTYPE html>
    <HTML ng-app=”app”>
    <HEAD>
    <link href=”https://jqwidgets.com/public/jqwidgets/styles/jqx.base.css” rel=”stylesheet” />
    <link href=”https://jqwidgets.com/public/jqwidgets/styles/jqx.light.css” rel=”stylesheet” />
    <script>
    “use strict”;
    var app = angular.module(“app”, [“jqwidgets”]);
    app.controller(‘appController’, function($scope,$log) {
    var vm = this;
    vm.jqxWindowSettings = {
    autoOpen:false,
    width: 500,
    height: 100,
    theme: ‘light’,
    closeButtonAction: ‘close’,
    showCloseButton : true,
    resizable: false,
    isModal: true,
    draggable: false,
    close: function (event) {
    $log.log(“close event: “, event);
    }
    };
    vm.openWindow = function() {
    vm.jqxWindowSettings.apply(‘open’);
    }

    vm.alertOk = function(event) {
    $log.log(‘closing window’);
    vm.jqxWindowSettings.apply(‘close’);

    }

    });
    </script>
    </HEAD>
    <BODY>
    <div ng-controller=”appController as ctrl”>
    <button ng-click=”ctrl.openWindow()”>
    Open
    </button>
    <jqx-window jqx-settings=”ctrl.jqxWindowSettings” ng-class=”dialogSeverity”>
    <div ng-class=”dialogSeverity”>
    Somthing
    </div>
    <div>
    <div style=”margin:5px;”>
    <span>Test</span>
    </div>
    <div>
    <div style=”text-align:center;”>
    <button type=”submit” ng-click=”ctrl.alertOk()”>Ok</button>
    </div>
    </div>
    </div>
    </jqx-window>
    </div>
    </BODY>
    </HTML>

    Window Close CallBack firing #86688

    Hristo
    Participant

    Hello kalel16,

    I cannot find something strange in this shared code.
    When you close window then appear message “close event: “.
    In another way when click on ‘Ok’ button this shows message “closing window” also invoke “close” method of the window and this fire close event again with particular message.
    Also used syntax is not like described in our Documentation.
    Please, provide us example with this issue in jseditor for better analyze if you still have same issue.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.