mirror of
https://github.com/enso-org/enso.git
synced 2024-12-23 06:01:37 +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"
|
||||
class="CodeEditor"
|
||||
:style="editorStyle"
|
||||
@keydown.arrow-left.stop
|
||||
@keydown.arrow-right.stop
|
||||
@keydown.arrow-up.stop
|
||||
@keydown.arrow-down.stop
|
||||
@keydown.enter.stop
|
||||
@keydown.backspace.stop
|
||||
@keydown.delete.stop
|
||||
|
@ -481,6 +481,8 @@ const handler = componentBrowserBindings.handler({
|
||||
@keydown.enter.stop
|
||||
@keydown.backspace.stop
|
||||
@keydown.delete.stop
|
||||
@keydown.arrow-left.stop
|
||||
@keydown.arrow-right.stop
|
||||
>
|
||||
<div class="panels">
|
||||
<div class="panel components">
|
||||
|
@ -87,6 +87,8 @@ export const widgetDefinition = defineWidget(
|
||||
@pointerdown.stop
|
||||
@click.stop
|
||||
@keydown.enter.stop
|
||||
@keydown.arrow-left.stop
|
||||
@keydown.arrow-right.stop
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -99,8 +99,6 @@ export const widgetDefinition = defineWidget(
|
||||
ref="input"
|
||||
v-model="editedContents"
|
||||
autoSelect
|
||||
@pointerdown.stop
|
||||
@click.stop
|
||||
@keydown.enter.stop="accepted"
|
||||
@focusin="editing.start()"
|
||||
@input="editing.edit(makeLiteralFromUserInput($event ?? ''))"
|
||||
|
@ -1,5 +1,14 @@
|
||||
<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>
|
||||
|
||||
<style scoped>
|
||||
|
@ -61,8 +61,12 @@ defineExpose({
|
||||
v-model="innerModel"
|
||||
class="AutoSizedInput"
|
||||
:style="inputStyle"
|
||||
@pointerdown.stop
|
||||
@click.stop
|
||||
@keydown.backspace.stop
|
||||
@keydown.delete.stop
|
||||
@keydown.arrow-left.stop
|
||||
@keydown.arrow-right.stop
|
||||
@keydown.enter.stop="onEnterDown"
|
||||
@input="emit('input', innerModel)"
|
||||
@change="onChange"
|
||||
|
Loading…
Reference in New Issue
Block a user