Skip to content

Can drag pane beyond min-size with push-other-panes=false #262

Description

@Kistras

It seems that #201, #160 were not actually resolved. Unless I'm doing something wrong, which is totally possible.

Panes can be dragged to size below one defined in min-size. This only happens when push-other-panes is set to false
Can reproduce with fresh vite project with contents below in App.vue (I'm not familiar enough with codepen or concept of minimum reproducible example like it was in issues before that, sorry). When the right/second splitter is dragged, the left pane gets squished:

<template>
<splitpanes :dbl-click-splitter="false" :push-other-panes="false" style="height: 100%; width: 100%; position: fixed; background-color: lightgray;">
    <pane :size="20" />
    <pane :size="60" style="background-color: ghostwhite;" />
    <pane :min-size="20" :size="20" style="background-color: lightgray;" />
</splitpanes>
</template>

<script setup lang="ts">
import 'splitpanes/dist/splitpanes.css'

import { Splitpanes, Pane } from 'splitpanes'
</script>

<style>
.splitpanes__splitter {
    width: 10px;
    background-color: black;
}
</style>

When dragged to a point where pane's size actually gets capped, total panes' width is 120% (so 100% + that min-size value. If min-size is changed, total width does so as well). It's the middle pane gaining size that squishes the left one (which has it's width unchanged).

Image

Behavior is the same on both firefox and chromium. Vite v8.2.2, Vue 3.5.41, Node v26.8.1. This happens on both splitpanes 4.1.2 and 4.1.1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions