Skip to content

Commit

Permalink
Refactor #2913
Browse files Browse the repository at this point in the history
  • Loading branch information
tugcekucukoglu committed Sep 8, 2022
1 parent 4023803 commit a5ebd31
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/components/splitter/Splitter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,13 @@
v-if="i !== panels.length - 1"
class="p-splitter-gutter"
role="separator"
tabindex="0"
:style="gutterStyle"
:aria-orientation="layout"
:aria-valuenow="prevSize"
tabindex="-1"
@mousedown="onGutterMouseDown($event, i)"
@touchstart="onGutterTouchStart($event, i)"
@touchmove="onGutterTouchMove($event, i)"
@touchend="onGutterTouchEnd($event, i)"
@keyup="onGutterKeyUp"
@keydown="onGutterKeyDown($event, i)"
>
<div class="p-splitter-gutter-handle"></div>
<div class="p-splitter-gutter-handle" tabindex="0" :style="gutterStyle" :aria-orientation="layout" :aria-valuenow="prevSize" @keyup="onGutterKeyUp" @keydown="onGutterKeyDown($event, i)"></div>
</div>
</template>
</div>
Expand Down Expand Up @@ -105,7 +100,7 @@ export default {
return child.type.name === 'SplitterPanel';
},
onResizeStart(event, index, isKeyDown) {
this.gutterElement = event.currentTarget || event.target;
this.gutterElement = event.currentTarget || event.target.parentElement;
this.size = this.horizontal ? DomHandler.getWidth(this.$el) : DomHandler.getHeight(this.$el);
if (!isKeyDown) {
Expand Down

0 comments on commit a5ebd31

Please sign in to comment.