mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-22 19:11:33 +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 {
|
||||
if (this.elements.length === 0) return
|
||||
const current = this.elements[this.current]
|
||||
if (!(current?.canBlur?.() ?? true)) {
|
||||
return
|
||||
}
|
||||
while (true) {
|
||||
for (let index = 0; index < this.elements.length; index++) {
|
||||
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
|
||||
}
|
||||
}
|
||||
|
@ -35,7 +35,7 @@
|
||||
$: selectedPriority = value.priority
|
||||
|
||||
const changePriority = async (newPriority: IssuePriority | undefined) => {
|
||||
if (!isEditable || newPriority === undefined || value.priority === newPriority) {
|
||||
if (!isEditable || newPriority == null || value.priority === newPriority) {
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -57,7 +57,7 @@
|
||||
}
|
||||
|
||||
const changePriority = async (newPriority: IssuePriority | undefined) => {
|
||||
if (!isEditable || newPriority === undefined || value === newPriority) {
|
||||
if (!isEditable || newPriority == null || value === newPriority) {
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -56,7 +56,7 @@
|
||||
const dispatch = createEventDispatcher()
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
|
@ -39,9 +39,9 @@
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
<div class="menu-item" on:click={() => dispatch('close', 2)}>
|
||||
<BooleanPresenter value={false} />
|
||||
{#if !value}
|
||||
{#if withoutUndefined ? !value : !value}
|
||||
<div class="check">
|
||||
<CheckBox checked={!value} kind={'primary'} />
|
||||
<CheckBox checked={withoutUndefined ? !value : !value} kind={'primary'} />
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user