mirror of
https://github.com/enso-org/enso.git
synced 2024-12-23 10:21:41 +03:00
Fix arrow keys in text inputs (#10244)
Fixes #10239 # Important Notes This is a quick fix, but we may consider better focus handling - perhaps the graph editor should be focusable?
This commit is contained in:
parent
4da5e611c9
commit
a2c4d94735
@ -331,6 +331,10 @@ const editorStyle = computed(() => {
|
|||||||
ref="rootElement"
|
ref="rootElement"
|
||||||
class="CodeEditor"
|
class="CodeEditor"
|
||||||
:style="editorStyle"
|
:style="editorStyle"
|
||||||
|
@keydown.arrow-left.stop
|
||||||
|
@keydown.arrow-right.stop
|
||||||
|
@keydown.arrow-up.stop
|
||||||
|
@keydown.arrow-down.stop
|
||||||
@keydown.enter.stop
|
@keydown.enter.stop
|
||||||
@keydown.backspace.stop
|
@keydown.backspace.stop
|
||||||
@keydown.delete.stop
|
@keydown.delete.stop
|
||||||
|
@ -481,6 +481,8 @@ const handler = componentBrowserBindings.handler({
|
|||||||
@keydown.enter.stop
|
@keydown.enter.stop
|
||||||
@keydown.backspace.stop
|
@keydown.backspace.stop
|
||||||
@keydown.delete.stop
|
@keydown.delete.stop
|
||||||
|
@keydown.arrow-left.stop
|
||||||
|
@keydown.arrow-right.stop
|
||||||
>
|
>
|
||||||
<div class="panels">
|
<div class="panels">
|
||||||
<div class="panel components">
|
<div class="panel components">
|
||||||
|
@ -87,6 +87,8 @@ export const widgetDefinition = defineWidget(
|
|||||||
@pointerdown.stop
|
@pointerdown.stop
|
||||||
@click.stop
|
@click.stop
|
||||||
@keydown.enter.stop
|
@keydown.enter.stop
|
||||||
|
@keydown.arrow-left.stop
|
||||||
|
@keydown.arrow-right.stop
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -99,8 +99,6 @@ export const widgetDefinition = defineWidget(
|
|||||||
ref="input"
|
ref="input"
|
||||||
v-model="editedContents"
|
v-model="editedContents"
|
||||||
autoSelect
|
autoSelect
|
||||||
@pointerdown.stop
|
|
||||||
@click.stop
|
|
||||||
@keydown.enter.stop="accepted"
|
@keydown.enter.stop="accepted"
|
||||||
@focusin="editing.start()"
|
@focusin="editing.start()"
|
||||||
@input="editing.edit(makeLiteralFromUserInput($event ?? ''))"
|
@input="editing.edit(makeLiteralFromUserInput($event ?? ''))"
|
||||||
|
@ -1,5 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<div ref="lexicalElement" class="LexicalContent" spellcheck="false" contenteditable="true" />
|
<div
|
||||||
|
ref="lexicalElement"
|
||||||
|
class="LexicalContent"
|
||||||
|
spellcheck="false"
|
||||||
|
contenteditable="true"
|
||||||
|
@keydown.arrow-left.stop
|
||||||
|
@keydown.arrow-right.stop
|
||||||
|
@keydown.arrow-up.stop
|
||||||
|
@keydown.arrow-down.stop
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
@ -61,8 +61,12 @@ defineExpose({
|
|||||||
v-model="innerModel"
|
v-model="innerModel"
|
||||||
class="AutoSizedInput"
|
class="AutoSizedInput"
|
||||||
:style="inputStyle"
|
:style="inputStyle"
|
||||||
|
@pointerdown.stop
|
||||||
|
@click.stop
|
||||||
@keydown.backspace.stop
|
@keydown.backspace.stop
|
||||||
@keydown.delete.stop
|
@keydown.delete.stop
|
||||||
|
@keydown.arrow-left.stop
|
||||||
|
@keydown.arrow-right.stop
|
||||||
@keydown.enter.stop="onEnterDown"
|
@keydown.enter.stop="onEnterDown"
|
||||||
@input="emit('input', innerModel)"
|
@input="emit('input', innerModel)"
|
||||||
@change="onChange"
|
@change="onChange"
|
||||||
|
Loading…
Reference in New Issue
Block a user