File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed
src/editor/inputs/subblocks Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change 33 <label :class =" { lifted: !isEmpty }" >{{ props.label }}</label >
44 <input
55 @focus =" isFocus = true"
6- @blur =" isFocus = false"
6+ @blur ="
7+ isFocus = false;
8+ refreshInput();
9+ "
710 type =" text"
811 v-model =" value"
12+ ref =" inputRef"
913 />
1014 </div >
1115</template >
@@ -19,6 +23,15 @@ const props = defineProps<{
1923}>();
2024const isFocus = ref (false );
2125const isEmpty = computed (() => value .value === " " );
26+
27+ const inputRef = ref <HTMLInputElement | null >(null );
28+ function refreshInput() {
29+ // On Chromium browsers, ligatures over 3 characters are not displayed until force refresh
30+ // Manually setting the value won't trigger Vue's reactivity system, no performance issue
31+ if (! inputRef .value ) return ;
32+ inputRef .value .value = value .value + " \u200B " ;
33+ inputRef .value .value = value .value ;
34+ }
2235 </script >
2336
2437<style lang="scss">
@@ -48,7 +61,7 @@ const isEmpty = computed(() => value.value === "");
4861 caret-color : var (--s-color-primary );
4962 line-height : 1.2 ;
5063 z-index : 1 ;
51- color :var (--s-color )
64+ color : var (--s-color );
5265 }
5366 label {
5467 color : var (--s-color-outline );
You can’t perform that action at this time.
0 commit comments