[TSK-760] Fix focus reset on context menu close (#3114)

Signed-off-by: Sergei Ogorelkov <sergei.ogorelkov@icloud.com>
This commit is contained in:
Sergei Ogorelkov 2023-04-28 18:31:06 +04:00 committed by GitHub
parent b4e3109350
commit 9412db643e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 14 deletions

View File

@ -150,7 +150,7 @@
} }
})) }))
) )
showPopup(Menu, { actions }, getEventPositionElement(ev), () => {}) showPopup(Menu, { actions }, getEventPositionElement(ev))
} }
function getAttrType (type: Type<any>): IntlString | undefined { function getAttrType (type: Type<any>): IntlString | undefined {
@ -172,7 +172,7 @@
return res?.name return res?.name
} }
function editLabel (evt: MouseEvent): void { function editLabel (evt: MouseEvent): void {
showPopup(EditClassLabel, { clazz }, getEventPositionElement(evt), () => {}) showPopup(EditClassLabel, { clazz }, getEventPositionElement(evt))
} }
</script> </script>

View File

@ -113,9 +113,7 @@
const showMenu = async (ev: MouseEvent, items: Doc[]): Promise<void> => { const showMenu = async (ev: MouseEvent, items: Doc[]): Promise<void> => {
ev.preventDefault() ev.preventDefault()
showPopup(Menu, { object: items, baseMenuClass }, getEventPositionElement(ev), () => { showPopup(Menu, { object: items, baseMenuClass }, getEventPositionElement(ev))
// selection = undefined
})
} }
const issuesQuery = createQuery() const issuesQuery = createQuery()
let tasks: Task[] = [] let tasks: Task[] = []

View File

@ -150,9 +150,7 @@
const showMenu = async (ev: MouseEvent, items: Doc[]): Promise<void> => { const showMenu = async (ev: MouseEvent, items: Doc[]): Promise<void> => {
ev.preventDefault() ev.preventDefault()
showPopup(Menu, { object: items, baseMenuClass }, getEventPositionElement(ev), () => { showPopup(Menu, { object: items, baseMenuClass }, getEventPositionElement(ev))
// selection = undefined
})
} }
const issuesQuery = createQuery() const issuesQuery = createQuery()
let issues: Issue[] = [] let issues: Issue[] = []

View File

@ -132,9 +132,7 @@
checked = [] checked = []
} }
const items = checked.length > 0 ? checked : object const items = checked.length > 0 ? checked : object
showPopup(Menu, { object: items, baseMenuClass }, getEventPositionElement(ev), () => { showPopup(Menu, { object: items, baseMenuClass }, getEventPositionElement(ev))
selection = undefined
})
} }
function changeSorting (key: string | string[]): void { function changeSorting (key: string | string[]): void {

View File

@ -102,9 +102,7 @@
const items = selectedObjectIds.length > 0 ? selectedObjectIds : object const items = selectedObjectIds.length > 0 ? selectedObjectIds : object
showPopup(Menu, { object: items, baseMenuClass }, getEventPositionElement(event), () => { showPopup(Menu, { object: items, baseMenuClass }, getEventPositionElement(event))
dispatch('row-focus')
})
} }
let limited: Doc[] = [] let limited: Doc[] = []