improvement for touch devices
This commit is contained in:
@@ -76,6 +76,7 @@
|
|||||||
function oncontextmenu(evt){
|
function oncontextmenu(evt){
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
evt.stopPropagation();
|
evt.stopPropagation();
|
||||||
|
startEdit();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -121,8 +122,9 @@
|
|||||||
{#if editing}
|
{#if editing}
|
||||||
<div class="boundary">
|
<div class="boundary">
|
||||||
<textarea bind:value={editValue.source} onkeyup={typed} autofocus={!simple}></textarea>
|
<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>
|
<button class="save" onclick={doSave}>{t('save')}</button>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/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>
|
</div>
|
||||||
@@ -389,4 +389,8 @@ table{
|
|||||||
|
|
||||||
.wiki.page h2{
|
.wiki.page h2{
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.wikilink{
|
||||||
|
display: block;
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user