aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/TabDocView.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2020-10-25 18:27:06 -0400
committerbobzel <zzzman@gmail.com>2020-10-25 18:27:06 -0400
commit14d6fa20b47ff49a199fc8c181de6857c37bd227 (patch)
tree89ed3208b47653a9df42fa3e97d9b8c4076fda99 /src/client/views/collections/TabDocView.tsx
parente2b5bc51c1fa4b4ed026e6582b80086808bdcb70 (diff)
fixed undoing tab name
Diffstat (limited to 'src/client/views/collections/TabDocView.tsx')
-rw-r--r--src/client/views/collections/TabDocView.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/collections/TabDocView.tsx b/src/client/views/collections/TabDocView.tsx
index 5bdf19a31..64e9df974 100644
--- a/src/client/views/collections/TabDocView.tsx
+++ b/src/client/views/collections/TabDocView.tsx
@@ -62,10 +62,10 @@ export class TabDocView extends React.Component<TabDocViewProps> {
const titleEle = tab.titleElement[0];
titleEle.size = StrCast(doc.title).length + 3;
titleEle.value = doc.title;
- titleEle.onchange = (e: any) => {
+ titleEle.onchange = undoBatch(action((e: any) => {
titleEle.size = e.currentTarget.value.length + 3;
Doc.GetProto(doc).title = e.currentTarget.value;
- };
+ }));
// shifts the focus to this tab when another tab is dragged over it
tab.element[0].onmouseenter = (e: MouseEvent) => {
if (SnappingManager.GetIsDragging() && tab.contentItem !== tab.header.parent.getActiveContentItem()) {