Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TSK-1405: Fix hover selection #3109

Merged
merged 1 commit into from
Apr 28, 2023
Merged
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
1 change: 1 addition & 0 deletions packages/kanban/src/components/KanbanRow.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
class:selection={selection !== undefined ? objects[selection]?._id === object._id : false}
class:checked={checkedSet.has(object._id)}
on:mouseover={mouseAttractor(() => dispatch('obj-focus', object))}
on:mouseenter={mouseAttractor(() => dispatch('obj-focus', object))}
on:focus={() => {}}
on:contextmenu={(evt) => showMenu(evt, object)}
draggable={true}
Expand Down
5 changes: 3 additions & 2 deletions packages/ui/src/components/ListView.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
-->
<script lang="ts">
import { createEventDispatcher } from 'svelte'
import { resizeObserver } from '..'
import { mouseAttractor, resizeObserver } from '..'

export let selection: number = 0
export let count: number
Expand Down Expand Up @@ -72,7 +72,8 @@
<div
class="list-item{addClass ? ` ${addClass}` : ''}"
class:selection={row === selection}
on:mouseover={() => onRow(row)}
on:mouseover={mouseAttractor(() => onRow(row))}
on:mouseenter={mouseAttractor(() => onRow(row))}
on:focus={() => {}}
bind:this={refs[row]}
on:click={() => dispatch('click', row)}
Expand Down
5 changes: 3 additions & 2 deletions packages/ui/src/components/SelectPopup.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<script lang="ts">
import type { Asset, IntlString } from '@hcengineering/platform'
import { createEventDispatcher } from 'svelte'
import { deviceOptionsStore, resizeObserver } from '..'
import { deviceOptionsStore, mouseAttractor, resizeObserver } from '..'
import { createFocusManager } from '../focus'
import type { AnySvelteComponent } from '../types'
import EditBox from './EditBox.svelte'
Expand Down Expand Up @@ -151,7 +151,8 @@
class="menu-item w-full"
on:click={() => dispatch('close', item.id)}
on:focus={() => dispatch('update', item)}
on:mouseover={() => dispatch('update', item)}
on:mouseover={mouseAttractor(() => dispatch('update', item))}
on:mouseenter={mouseAttractor(() => dispatch('update', item))}
>
<div class="flex-row-center" class:mt-2={huge} class:mb-2={huge}>
{#if hasSelected}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
id={category._id}
style:transform={category._id === tracker.issueStatusCategory.Started ? 'rotate(-90deg)' : ''}
viewBox="0 0 16 16"
stroke-width={0.75}
stroke={fill}
xmlns="http://www.w3.org/2000/svg"
>
{#if category._id === tracker.issueStatusCategory.Backlog}
Expand Down
1 change: 1 addition & 0 deletions plugins/view-resources/src/components/Table.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@
class:fixed={row === selection}
class:selected={row === selection}
on:mouseover={mouseAttractor(() => onRow(object))}
on:mouseenter={mouseAttractor(() => onRow(object))}
on:focus={() => {}}
bind:this={refs[row]}
on:contextmenu|preventDefault={(ev) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,7 @@
on:contextmenu={(event) => handleMenuOpened(event, docObject)}
on:focus={() => {}}
on:mouseover={mouseAttractor(() => handleRowFocused(docObject))}
on:mouseenter={mouseAttractor(() => handleRowFocused(docObject))}
{props}
on:on-mount={() => {
wasLoaded = true
Expand Down