File tree Expand file tree Collapse file tree 2 files changed +15
-6
lines changed
packages/paneforge/src/lib Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " paneforge " : patch
3+ ---
4+
5+ fix: issue on reenabling resizer after trying to drag it while disabled
Original file line number Diff line number Diff line change @@ -625,6 +625,14 @@ class PaneResizerState {
625625 } ) ;
626626 }
627627
628+ #startDragging = ( e : MouseEvent | TouchEvent ) => {
629+ e . preventDefault ( ) ;
630+
631+ if ( this . #disabled. current ) return ;
632+ this . #group. startDragging ( this . #id. current , e ) ;
633+ this . #onDraggingChange. current ( true ) ;
634+ } ;
635+
628636 #stopDraggingAndBlur = ( ) => {
629637 const node = this . #ref. current ;
630638 if ( ! node ) return ;
@@ -682,9 +690,7 @@ class PaneResizerState {
682690 } ;
683691
684692 #onmousedown = ( e : MouseEvent ) => {
685- e . preventDefault ( ) ;
686- this . #group. startDragging ( this . #id. current , e ) ;
687- this . #onDraggingChange. current ( true ) ;
693+ this . #startDragging( e ) ;
688694 } ;
689695
690696 #onmouseup = ( ) => {
@@ -700,9 +706,7 @@ class PaneResizerState {
700706 } ;
701707
702708 #ontouchstart = ( e : TouchEvent ) => {
703- e . preventDefault ( ) ;
704- this . #group. startDragging ( this . #id. current , e ) ;
705- this . #onDraggingChange. current ( true ) ;
709+ this . #startDragging( e ) ;
706710 } ;
707711
708712 props = $derived . by (
You can’t perform that action at this time.
0 commit comments