diff --git a/packages/bbui/src/Form/Core/Picker.svelte b/packages/bbui/src/Form/Core/Picker.svelte index 55bd95b5e2..235f8ecc9e 100644 --- a/packages/bbui/src/Form/Core/Picker.svelte +++ b/packages/bbui/src/Form/Core/Picker.svelte @@ -202,8 +202,8 @@ aria-selected="true" tabindex="0" on:click={() => onSelectOption(getOptionValue(option, idx))} - on:mouseenter={(e) => onOptionMouseenter(e, option)} - on:mouseleave={(e) => onOptionMouseleave(e, option)} + on:mouseenter={e => onOptionMouseenter(e, option)} + on:mouseleave={e => onOptionMouseleave(e, option)} class:is-disabled={!isOptionEnabled(option)} > {#if getOptionIcon(option, idx)} diff --git a/packages/bbui/src/Tooltip/Context.svelte b/packages/bbui/src/Tooltip/Context.svelte index 006bfd1a80..0a0a48172b 100644 --- a/packages/bbui/src/Tooltip/Context.svelte +++ b/packages/bbui/src/Tooltip/Context.svelte @@ -5,7 +5,7 @@ export let anchor export let visible = false - export let offset = 0; + export let offset = 0 $: target = getContext(Context.PopoverRoot) || "#app" @@ -16,12 +16,13 @@ const updatePosition = (anchor, tooltip) => { if (anchor == null || tooltip == null) { - return; + return } requestAnimationFrame(() => { - const rect = anchor.getBoundingClientRect(); - const windowOffset = (window.innerHeight - offset) - (tooltip.clientHeight + rect.y) + const rect = anchor.getBoundingClientRect() + const windowOffset = + window.innerHeight - offset - (tooltip.clientHeight + rect.y) const tooltipWidth = tooltip.clientWidth x = rect.x - tooltipWidth - offset @@ -32,11 +33,11 @@ $: updatePosition(anchor, tooltip) const handleMouseenter = () => { - hovering = true; + hovering = true } const handleMouseleave = () => { - hovering = false; + hovering = false } @@ -50,10 +51,7 @@ class="wrapper" class:visible={visible || hovering} > -