Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions packages/fiori/src/UploadCollectionItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ class UploadCollectionItem extends ListItem {
async onDetailClick() {
super.onDetailClick();
this._editing = true;
this._editMode = true;

await this._initInputField();
}
Expand Down Expand Up @@ -300,6 +301,7 @@ class UploadCollectionItem extends ListItem {
this.fireDecoratorEvent("rename");

this._editing = false;
this._editMode = false;
this._focus();
}

Expand All @@ -311,6 +313,7 @@ class UploadCollectionItem extends ListItem {

async _onRenameCancel(e: KeyboardEvent | UI5CustomEvent<Button, "click">) {
this._editing = false;
this._editMode = false;

if (isEscape(e as KeyboardEvent)) {
await renderFinished();
Expand All @@ -326,6 +329,29 @@ class UploadCollectionItem extends ListItem {
}
}

_handleTabNext(e: KeyboardEvent) {
if (this._editMode) {
return super._handleTabNext(e);
}

if (this.shouldForwardTabAfter()) {
if (!this.fireDecoratorEvent("forward-after")) {
e.preventDefault();
}
}
}

_handleTabPrevious(e: KeyboardEvent) {
if (this._editMode) {
return super._handleTabPrevious(e);
}

const target = e.target as HTMLElement;
if (this.shouldForwardTabBefore(target)) {
this.fireDecoratorEvent("forward-before");
}
}

_focus() {
this.fireDecoratorEvent("focus-requested");
}
Expand Down
Loading
Loading