Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

Commit

Permalink
Add Focus Lost to Commant Save (#2897)
Browse files Browse the repository at this point in the history
  • Loading branch information
elsiosanchez authored Oct 30, 2024
1 parent 0156b65 commit 77ae8c6
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/components/ADempiere/TabManager/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -676,14 +676,29 @@ export default defineComponent({
})
}

function focusLost(currentTab) {
const { containerUuid } = currentTab
const columnName = store.getters.getFieldFocusColumnName
const currentFieldFocus = document.getElementById(`${columnName}`)
currentFieldFocus.__vue__.blur()
store.dispatch('notifyFocusLost', {
containerUuid,
columnName,
value: undefined
})
}

function theAction(event) {
const { currentTab } = store.getters.getContainerInfo
switch (event.srcKey) {
case 'new':
newRecordTab(currentTab)
break
case 'save':
saveRecordTab(currentTab)
focusLost(currentTab)
setTimeout(() => {
saveRecordTab(currentTab)
}, 500)
break
case 'undo':
undoChanges(currentTab)
Expand Down

0 comments on commit 77ae8c6

Please sign in to comment.