mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-23 03:22:19 +03:00
UBERF-5357 (#4571)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
parent
e23d587033
commit
7b61f3d652
@ -44,13 +44,15 @@ class FocusManagerImpl implements FocusManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
next (inc?: 1 | -1): void {
|
next (inc?: 1 | -1): void {
|
||||||
|
if (this.elements.length === 0) return
|
||||||
const current = this.elements[this.current]
|
const current = this.elements[this.current]
|
||||||
if (!(current?.canBlur?.() ?? true)) {
|
if (!(current?.canBlur?.() ?? true)) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
while (true) {
|
for (let index = 0; index < this.elements.length; index++) {
|
||||||
this.current = this.current + (inc ?? 1)
|
this.current = this.current + (inc ?? 1)
|
||||||
if (this.elements[Math.abs(this.current) % this.elements.length].focus()) {
|
const el = this.elements[Math.abs(this.current) % this.elements.length]
|
||||||
|
if (el?.focus()) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
$: selectedPriority = value.priority
|
$: selectedPriority = value.priority
|
||||||
|
|
||||||
const changePriority = async (newPriority: IssuePriority | undefined) => {
|
const changePriority = async (newPriority: IssuePriority | undefined) => {
|
||||||
if (!isEditable || newPriority === undefined || value.priority === newPriority) {
|
if (!isEditable || newPriority == null || value.priority === newPriority) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
const changePriority = async (newPriority: IssuePriority | undefined) => {
|
const changePriority = async (newPriority: IssuePriority | undefined) => {
|
||||||
if (!isEditable || newPriority === undefined || value === newPriority) {
|
if (!isEditable || newPriority == null || value === newPriority) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@
|
|||||||
const dispatch = createEventDispatcher()
|
const dispatch = createEventDispatcher()
|
||||||
|
|
||||||
const changeStatus = async (newStatus: Ref<IssueStatus> | undefined, refocus: boolean = true) => {
|
const changeStatus = async (newStatus: Ref<IssueStatus> | undefined, refocus: boolean = true) => {
|
||||||
if (!isEditable || newStatus === undefined || value.status === newStatus) {
|
if (!isEditable || newStatus == null || value.status === newStatus) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,9 +39,9 @@
|
|||||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||||
<div class="menu-item" on:click={() => dispatch('close', 2)}>
|
<div class="menu-item" on:click={() => dispatch('close', 2)}>
|
||||||
<BooleanPresenter value={false} />
|
<BooleanPresenter value={false} />
|
||||||
{#if !value}
|
{#if withoutUndefined ? !value : !value}
|
||||||
<div class="check">
|
<div class="check">
|
||||||
<CheckBox checked={!value} kind={'primary'} />
|
<CheckBox checked={withoutUndefined ? !value : !value} kind={'primary'} />
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user