@aptre/flex-layout 0.1.9 → 0.1.10
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/index.mjs +7 -2
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3565,6 +3565,7 @@ var TabButton = (props) => {
|
|
|
3565
3565
|
return false;
|
|
3566
3566
|
};
|
|
3567
3567
|
const onClose = (event) => {
|
|
3568
|
+
event.preventDefault();
|
|
3568
3569
|
if (isClosable()) {
|
|
3569
3570
|
layout.doAction(Actions.deleteTab(node.getId()));
|
|
3570
3571
|
} else {
|
|
@@ -3574,6 +3575,9 @@ var TabButton = (props) => {
|
|
|
3574
3575
|
const onCloseMouseDown = (event) => {
|
|
3575
3576
|
event.stopPropagation();
|
|
3576
3577
|
};
|
|
3578
|
+
const onCloseKeyDown = (event) => {
|
|
3579
|
+
event.stopPropagation();
|
|
3580
|
+
};
|
|
3577
3581
|
React10.useLayoutEffect(() => {
|
|
3578
3582
|
updateRect();
|
|
3579
3583
|
if (layout.getEditingTab() === node) {
|
|
@@ -3637,7 +3641,7 @@ var TabButton = (props) => {
|
|
|
3637
3641
|
const closeTitle = layout.i18nName("Close" /* Close_Tab */);
|
|
3638
3642
|
renderState.buttons.push(
|
|
3639
3643
|
/* @__PURE__ */ React10.createElement(
|
|
3640
|
-
"
|
|
3644
|
+
"button",
|
|
3641
3645
|
{
|
|
3642
3646
|
key: "close",
|
|
3643
3647
|
"data-layout-path": path + "/button/close",
|
|
@@ -3645,7 +3649,8 @@ var TabButton = (props) => {
|
|
|
3645
3649
|
className: cm("flexlayout__tab_button_trailing" /* FLEXLAYOUT__TAB_BUTTON_TRAILING */),
|
|
3646
3650
|
onMouseDown: onCloseMouseDown,
|
|
3647
3651
|
onClick: onClose,
|
|
3648
|
-
onTouchStart: onCloseMouseDown
|
|
3652
|
+
onTouchStart: onCloseMouseDown,
|
|
3653
|
+
onKeyDown: onCloseKeyDown
|
|
3649
3654
|
},
|
|
3650
3655
|
typeof icons.close === "function" ? icons.close(node) : icons.close
|
|
3651
3656
|
)
|