Skip to content

Commit 1d6d43f

Browse files
committed
E
1 parent 4c18797 commit 1d6d43f

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

src/components/ListItems/ListElement.vue

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
@dragover="dragOver" @drop="drop(index)">
2424
<div class="item-container" @click="focusEditable(index)">
2525
<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)"
2828
spellcheck="false">{{ item }}</div>
2929
</div>
3030
</li>
@@ -109,10 +109,10 @@ export default {
109109
element.focus();
110110
if (position !== null) {
111111
this.setCaretPosition(element, position);
112-
} else {
112+
}/* else {
113113
// Ensure the caret is placed at the end if position is not specified
114114
this.setCaretPosition(element, element.innerText.length);
115-
}
115+
}*/
116116
}
117117
});
118118
},
@@ -195,12 +195,18 @@ export default {
195195
},
196196
clearStorage() {
197197
localStorage.clear();
198+
this.loadInitialData();
198199
}
199200
}
200201
}
201202
</script>
202203

203204
<style scoped>
205+
206+
.text-cursor {
207+
cursor: text;
208+
}
209+
204210
.item-text:focus {
205211
outline: none;
206212
/* Remove default outline for focused element */

0 commit comments

Comments
 (0)