Completed
Last Updated: 22 Nov 2023 14:24 by ADMIN
Laurent
Created on: 21 Sep 2021 07:02
Category: Window
Type: Bug Report
1
Window is not getting focused when using jQuery 3.6.0

Bug report

Upon opening the Window, the widget is not getting focused when using jQuery 3.6.0.

Reproduction of the problem

  1. Open this Dojo example - https://dojo.telerik.com/@martin.tabakov@progress.com/EcIheNif/3

Current behavior

The Window is not focused upon opening.

Expected/desired behavior

The Window should be focused upon opening.

Environment

  • Kendo UI version: 2021.3.914
  • jQuery version: 3.6.0
  • Browser: [all]
2 comments
ADMIN
Dimitar
Posted on: 14 Mar 2022 09:25

Hi,

The issue is still not resolved. There is a workaround for it by handling the activate Window event:

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Window workaround</title>
    <link rel="stylesheet" href="https://kendo.cdn.telerik.com/2022.1.301/styles/kendo.common.min.css">
    <link rel="stylesheet" href="https://kendo.cdn.telerik.com/2022.1.301/styles/kendo.default.min.css">
    <script src="https://code.jquery.com/jquery-3.6.0.js"></script>
    <script src="https://kendo.cdn.telerik.com/2022.1.301/js/kendo.all.min.js"></script>
  </head>
  <body>
    <div id="example">
      <div id="window">
        <p>Window content</p>
      </div>
      <button type="button" id="btn" class="btnClass">Click here to open the window.</button>
      <div class="responsive-message"></div>
      <script>
        $(document).ready(function () {
          var myWindow = $("#window"),
              btn = $("#btn");
          
          btn.click(function() {
            myWindow.data("kendoWindow").center().open();
          });

          function onActivate(ev) {
            ev.sender.wrapper[0].focus();
            $(".responsive-message").text("activeElement: " + document.activeElement.className);
          }

          myWindow.kendoWindow({
            title: "Window",
            visible: false,
            activate: onActivate
          }).data("kendoWindow");
        });
      </script>
    </div>
  </body>
</html>

 

Regards,
Dimitar
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Venkatesh
Posted on: 09 Mar 2022 11:02
I am having same issue, is this fixed?