@progress/kendo-react-layout 5.14.0-dev.202306011426 → 5.14.0-dev.202306020002
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/js/kendo-react-layout.js +1 -1
- package/dist/es/contextmenu/ContextMenu.js +3 -2
- package/dist/es/menu/components/MenuItemInternal.js +3 -2
- package/dist/es/package-metadata.js +1 -1
- package/dist/npm/contextmenu/ContextMenu.js +2 -1
- package/dist/npm/menu/components/MenuItemInternal.js +2 -1
- package/dist/npm/package-metadata.js +1 -1
- package/dist/systemjs/kendo-react-layout.js +1 -1
- package/package.json +13 -13
|
@@ -10,7 +10,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
import * as React from 'react';
|
|
13
|
-
import { classNames } from '@progress/kendo-react-common';
|
|
13
|
+
import { classNames, getActiveElement } from '@progress/kendo-react-common';
|
|
14
14
|
import { Popup } from '@progress/kendo-react-popup';
|
|
15
15
|
import { Menu } from '../menu/components/Menu';
|
|
16
16
|
/**
|
|
@@ -23,7 +23,8 @@ export var ContextMenu = function (props) {
|
|
|
23
23
|
setTimeout(function () {
|
|
24
24
|
var element = menuRef.current && menuRef.current.element;
|
|
25
25
|
var menuItem = element && element.querySelector('.k-menu-item');
|
|
26
|
-
|
|
26
|
+
var activeElement = getActiveElement(menuItem && menuItem.ownerDocument);
|
|
27
|
+
if (menuItem && menuItem !== activeElement) {
|
|
27
28
|
menuItem.focus();
|
|
28
29
|
}
|
|
29
30
|
});
|
|
@@ -14,7 +14,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
14
14
|
};
|
|
15
15
|
})();
|
|
16
16
|
import * as React from 'react';
|
|
17
|
-
import { classNames, IconWrap } from '@progress/kendo-react-common';
|
|
17
|
+
import { classNames, getActiveElement, IconWrap } from '@progress/kendo-react-common';
|
|
18
18
|
import { Popup } from '@progress/kendo-react-popup';
|
|
19
19
|
import { shouldOpenItem, isFirstItemFromSiblings } from '../utils/itemsIdsUtils';
|
|
20
20
|
import { getPopupSettings, convertBoolDirectionToString, getDOMElementId } from '../utils/misc';
|
|
@@ -54,6 +54,7 @@ var MenuItemInternal = /** @class */ (function (_super) {
|
|
|
54
54
|
var focusedItemId = this.props.focusedItemId;
|
|
55
55
|
var currentItemId = this.props.item.id;
|
|
56
56
|
if (focusedItemId) {
|
|
57
|
+
var activeElement = getActiveElement(document);
|
|
57
58
|
// If the item has been navigated to via the keyboard navigation
|
|
58
59
|
// (Clicking and focusing an item also come here).
|
|
59
60
|
if (prevProps.focusedItemId !== focusedItemId
|
|
@@ -61,7 +62,7 @@ var MenuItemInternal = /** @class */ (function (_super) {
|
|
|
61
62
|
// https://github.com/telerik/kendo-react/issues/216 :
|
|
62
63
|
// No need to focus the wrapping menu item DOM element
|
|
63
64
|
// when a child DOM element was clicked.
|
|
64
|
-
&& !this.itemElement.contains(
|
|
65
|
+
&& !this.itemElement.contains(activeElement)) {
|
|
65
66
|
this.itemElement.focus();
|
|
66
67
|
}
|
|
67
68
|
}
|
|
@@ -5,7 +5,7 @@ export var packageMetadata = {
|
|
|
5
5
|
name: '@progress/kendo-react-layout',
|
|
6
6
|
productName: 'KendoReact',
|
|
7
7
|
productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
|
|
8
|
-
publishDate:
|
|
8
|
+
publishDate: 1685662019,
|
|
9
9
|
version: '',
|
|
10
10
|
licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning'
|
|
11
11
|
};
|
|
@@ -26,7 +26,8 @@ var ContextMenu = function (props) {
|
|
|
26
26
|
setTimeout(function () {
|
|
27
27
|
var element = menuRef.current && menuRef.current.element;
|
|
28
28
|
var menuItem = element && element.querySelector('.k-menu-item');
|
|
29
|
-
|
|
29
|
+
var activeElement = (0, kendo_react_common_1.getActiveElement)(menuItem && menuItem.ownerDocument);
|
|
30
|
+
if (menuItem && menuItem !== activeElement) {
|
|
30
31
|
menuItem.focus();
|
|
31
32
|
}
|
|
32
33
|
});
|
|
@@ -57,6 +57,7 @@ var MenuItemInternal = /** @class */ (function (_super) {
|
|
|
57
57
|
var focusedItemId = this.props.focusedItemId;
|
|
58
58
|
var currentItemId = this.props.item.id;
|
|
59
59
|
if (focusedItemId) {
|
|
60
|
+
var activeElement = (0, kendo_react_common_1.getActiveElement)(document);
|
|
60
61
|
// If the item has been navigated to via the keyboard navigation
|
|
61
62
|
// (Clicking and focusing an item also come here).
|
|
62
63
|
if (prevProps.focusedItemId !== focusedItemId
|
|
@@ -64,7 +65,7 @@ var MenuItemInternal = /** @class */ (function (_super) {
|
|
|
64
65
|
// https://github.com/telerik/kendo-react/issues/216 :
|
|
65
66
|
// No need to focus the wrapping menu item DOM element
|
|
66
67
|
// when a child DOM element was clicked.
|
|
67
|
-
&& !this.itemElement.contains(
|
|
68
|
+
&& !this.itemElement.contains(activeElement)) {
|
|
68
69
|
this.itemElement.focus();
|
|
69
70
|
}
|
|
70
71
|
}
|
|
@@ -8,7 +8,7 @@ exports.packageMetadata = {
|
|
|
8
8
|
name: '@progress/kendo-react-layout',
|
|
9
9
|
productName: 'KendoReact',
|
|
10
10
|
productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
|
|
11
|
-
publishDate:
|
|
11
|
+
publishDate: 1685662019,
|
|
12
12
|
version: '',
|
|
13
13
|
licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning'
|
|
14
14
|
};
|