Declined
Last Updated: 14 Jun 2019 11:01 by ADMIN
Sompop
Created on: 17 May 2019 17:31
Category: Dialog
Type: Bug Report
0
When Modal = true when using MVVM, page is always in modal mode even if the dialog is not visible

When using MVVM, when modal = true, the entire page is always in modal mode at page load even if the dialog is not visible. When not using MVVM, when the dialog is not visible, the page is not in modal mode which is expected.

 

Here is a modified Dojo that I got from your demo page that I set the dialog to not visible but the modal is on at page load. 

https://dojo.telerik.com/OYOcedum

 

Here is the same not using MVVM that the dialog is set to not visible and the modal is not on at page load as expected.

https://dojo.telerik.com/oHaZukUf

3 comments
ADMIN
Veselin Tsvetanov
Posted on: 14 Jun 2019 11:01
Hi Sompop,

The issue discussed has been closed. The reason for that is the fact that the visible binding in the case of Window and Dialog is inherited from the widget implementation. As expected for all widgets, it only plays with the display CSS property of the Window / Dialog element. The visible configuration option of the Window does not have its own binder. In order to resolve the case in question, the following custom binder should be used:
kendo.data.binders.widget.dialogOpen = kendo.data.Binder.extend({
      init: function(widget, bindings, options) {
          kendo.data.Binder.fn.init.call(this, widget.element[0], bindings, options);
      },
      refresh: function() {
        var that = this;
        var value = that.bindings["dialogOpen"].get();
        var dialog = $(that.element).data("kendoDialog");
         
        if(value){
            dialog.open();
        }else{
          dialog.close();
        }
      }
  });

Here you could find a small sample implementing the above suggestion.

Regards,
Veselin Tsvetanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Sompop
Posted on: 10 Jun 2019 21:21
Is there an ETA on when this might be fixed?
ADMIN
Veselin Tsvetanov
Posted on: 20 May 2019 11:36
Hello Sompop,

The observed is a bug in the Window functionality. That is why, I have included the issue in our backlog. Also, I have converted the current thread to a Bug report in our Feedback portal, so that you will be able to track its status. Here is the link to the public post: https://feedback.telerik.com/kendo-jquery-ui/1409585-when-modal-true-when-using-mvvm-page-is-always-in-modal-mode-even-if-the-dialog-is-not-visible

Also, as a small token of gratitude for the reported, I have updated your Telerik points.

Regards,
Veselin Tsvetanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.