fix(editor): Disable expression editor modal opening on readonly field (#8457)

This commit is contained in:
Csaba Tuncsik
2024-01-29 16:34:10 +01:00
committed by GitHub
parent 9e93980957
commit eb27ed068b
6 changed files with 118 additions and 20 deletions

View File

@@ -1,5 +1,5 @@
<template>
<div ref="root" data-test-id="inline-expression-editor-input"></div>
<div ref="root" :class="$style.editor" data-test-id="inline-expression-editor-input"></div>
</template>
<script lang="ts">
@@ -169,4 +169,18 @@ export default defineComponent({
});
</script>
<style lang="scss"></style>
<style lang="scss" module>
.editor div[contenteditable='false'] {
background-color: var(--disabled-fill, var(--color-background-light));
cursor: not-allowed;
}
</style>
<style lang="scss" scoped>
:deep(.cm-editor) {
padding-left: 0;
}
:deep(.cm-content) {
padding-left: var(--spacing-2xs);
}
</style>