mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 15:02:21 -04:00
Prevent hiding handles by clicking on handles
This commit is contained in:
parent
9001b597da
commit
97647e7b24
3 changed files with 17 additions and 9 deletions
|
@ -19,14 +19,20 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
|
||||
<ButtonToolbar
|
||||
{id}
|
||||
class={`dropdown-menu btn-dropdown-menu ${className}`}
|
||||
class="dropdown-menu btn-dropdown-menu {className}"
|
||||
wrap={false}
|
||||
{api}
|
||||
>
|
||||
<slot />
|
||||
<div on:mousedown|preventDefault|stopPropagation>
|
||||
<slot />
|
||||
</div>
|
||||
</ButtonToolbar>
|
||||
|
||||
<style lang="scss">
|
||||
div {
|
||||
display: contents;
|
||||
}
|
||||
|
||||
:global(.dropdown-menu.btn-dropdown-menu) {
|
||||
display: none;
|
||||
min-width: 0;
|
||||
|
|
|
@ -16,7 +16,13 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
setContext(dropdownKey, null);
|
||||
</script>
|
||||
|
||||
<div {id} class="dropdown-menu" class:show aria-labelledby={labelledby}>
|
||||
<div
|
||||
{id}
|
||||
class="dropdown-menu"
|
||||
class:show
|
||||
aria-labelledby={labelledby}
|
||||
on:mousedown|preventDefault|stopPropagation
|
||||
>
|
||||
<div class="dropdown-content {className}">
|
||||
<slot />
|
||||
</div>
|
||||
|
|
|
@ -41,23 +41,19 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
});
|
||||
</script>
|
||||
|
||||
<!-- <textarea bind:value use:openCodemirror /> -->
|
||||
<div
|
||||
on:click|stopPropagation
|
||||
on:focus|stopPropagation
|
||||
on:keydown|stopPropagation
|
||||
on:focusin|stopPropagation
|
||||
on:keyup|stopPropagation
|
||||
on:focusin|stopPropagation
|
||||
on:mousedown|preventDefault|stopPropagation
|
||||
on:mouseup|stopPropagation
|
||||
>
|
||||
<!-- TODO no focusin for now, as EditingArea will defer to Editable/Codable -->
|
||||
<textarea
|
||||
bind:this={textarea}
|
||||
value={initialValue}
|
||||
on:mouseup|preventDefault|stopPropagation
|
||||
on:keyup|stopPropagation
|
||||
on:click|stopPropagation
|
||||
on:focusin|stopPropagation
|
||||
on:input={onInput}
|
||||
use:openCodemirror
|
||||
/>
|
||||
|
|
Loading…
Reference in a new issue