File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
packages/solid-repl/src/components Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -48,11 +48,17 @@ export const GridResizer: Component<{
4848
4949 createEffect ( ( ) => {
5050 if ( isDragging ( ) ) {
51+ // Fixes Firefox issue where dragging cursor fails to emit events to overlay, and instead to iframe, resulting in resizer bar not moving.
52+ // use class instead of style because style attribute, when tracked, value is reset. Related to https://github.com/solidjs/solid/issues/1938
53+ document . querySelectorAll ( 'iframe' ) . forEach ( ( el ) => el . classList . add ( 'pointer-events-none' ) ) ;
54+
5155 window . addEventListener ( 'mousemove' , onMouseMove ) ;
5256 window . addEventListener ( 'mouseup' , onResizeEnd ) ;
5357 window . addEventListener ( 'touchmove' , onTouchMove ) ;
5458 window . addEventListener ( 'touchend' , onResizeEnd ) ;
5559 } else {
60+ document . querySelectorAll ( 'iframe' ) . forEach ( ( el ) => el . classList . remove ( 'pointer-events-none' ) ) ;
61+
5662 window . removeEventListener ( 'mousemove' , onMouseMove ) ;
5763 window . removeEventListener ( 'mouseup' , onResizeEnd ) ;
5864 window . removeEventListener ( 'touchmove' , onTouchMove ) ;
You can’t perform that action at this time.
0 commit comments