File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change 23
23
@dragover =" dragOver" @drop =" drop(index)" >
24
24
<div class =" item-container" @click =" focusEditable(index)" >
25
25
<button class =" remove-button" @click =" removeItem(index)" >X</button >
26
- <div ref =" itemSpan" contenteditable =" true" @keydown.enter.prevent =" handleEnter(index, $event)"
27
- @keydown.backspace =" handleBackspace(index, $event)" @blur =" updateItem(index, $event)" class = " item-text "
26
+ <div class = " text-cursor item-text " ref =" itemSpan" contenteditable =" true" @keydown.enter.prevent =" handleEnter(index, $event)"
27
+ @keydown.backspace =" handleBackspace(index, $event)" @blur =" updateItem(index, $event)"
28
28
spellcheck =" false" >{{ item }}</div >
29
29
</div >
30
30
</li >
@@ -109,10 +109,10 @@ export default {
109
109
element .focus ();
110
110
if (position !== null ) {
111
111
this .setCaretPosition (element, position);
112
- } else {
112
+ }/* else {
113
113
// Ensure the caret is placed at the end if position is not specified
114
114
this.setCaretPosition(element, element.innerText.length);
115
- }
115
+ }*/
116
116
}
117
117
});
118
118
},
@@ -195,12 +195,18 @@ export default {
195
195
},
196
196
clearStorage () {
197
197
localStorage .clear ();
198
+ this .loadInitialData ();
198
199
}
199
200
}
200
201
}
201
202
</script >
202
203
203
204
<style scoped>
205
+
206
+ .text-cursor {
207
+ cursor : text ;
208
+ }
209
+
204
210
.item-text :focus {
205
211
outline : none ;
206
212
/* Remove default outline for focused element */
You can’t perform that action at this time.
0 commit comments