Skip to content

Commit

Permalink
fix multi div select and edit
Browse files Browse the repository at this point in the history
  • Loading branch information
hyvyys committed Jan 23, 2021
1 parent 55fc212 commit c8da2c7
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/components/TesterBody.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
@paste="onPaste"
@input="onInput"
@focus="onFocus"
@selectstart="onSelectStart"
@mousemove="onSelectStart"
@click="onSelectEnd"
/>
</div>
Expand Down Expand Up @@ -129,11 +129,15 @@ export default {
beforeDestroy() {
},
methods: {
onSelectStart() {
this.isContentEditable = false;
onSelectStart(event) {
if (event.buttons === 1) {
this.isContentEditable = false;
console.log('nonEditable')
}
},
onSelectEnd() {
this.isContentEditable = true;
console.log('editable')
},
configureAnchors() {
return;
Expand Down

0 comments on commit c8da2c7

Please sign in to comment.