|
|
|
|
@ -76,6 +76,7 @@
@@ -76,6 +76,7 @@
|
|
|
|
|
function oncontextmenu(evt){ |
|
|
|
|
evt.preventDefault(); |
|
|
|
|
evt.stopPropagation(); |
|
|
|
|
startEdit(); |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -121,8 +122,9 @@
@@ -121,8 +122,9 @@
|
|
|
|
|
{#if editing} |
|
|
|
|
<div class="boundary"> |
|
|
|
|
<textarea bind:value={editValue.source} onkeyup={typed} autofocus={!simple}></textarea> |
|
|
|
|
<button class="cancel" onclick={e => editing = false}>{t('cancel')}</button> |
|
|
|
|
<button class="save" onclick={doSave}>{t('save')}</button> |
|
|
|
|
</div> |
|
|
|
|
{/if} |
|
|
|
|
<svelte:element this={type} {onmousedown} {onmouseup} {ontouchstart} {ontouchend} {oncontextmenu} class={{editable}} title={t('long_click_to_edit')} >{@html target(editValue.rendered)}</svelte:element> |
|
|
|
|
<svelte:element this={type} {onclick} {oncontextmenu} class={{editable}} title={t('long_click_to_edit')} >{@html target(editValue.rendered)}</svelte:element> |
|
|
|
|
</div> |