Search code examples
kendo-uiwindowdouble-clickmaximizekendo-window

Kendo window disable maximize on double-click


Plunkr: http://plnkr.co/edit/LoMmQ3y4snPrELJz9ZSq?p=preview

Can anyone help me on how to disable maximization of the window by double-clicking on its title? I tried to disable the dblclick event with the following code, but it doesn't seem to work.

$(document).on('dblclick','.k-window-titlebar',function(e){
  e.preventDefault();
  console.log('dblclick');
  return false;
});

Solution

  • This is not a nice solution but might work, try toggling back to the previous size:

    // Window definition
    var win = $("#win1").kendoWindow({
        width: "300px",
        height: "100px",
        title: "Window 1",
        actions: []
    }).data("kendoWindow");
    
    $(document).on('dblclick','.k-window-titlebar',function(e){
      // Restore old size
      win.toggleMaximization();
    });