diff options
| author | Bob Zeleznik <zzzman@gmail.com> | 2020-06-04 13:55:24 -0400 |
|---|---|---|
| committer | Bob Zeleznik <zzzman@gmail.com> | 2020-06-04 13:55:24 -0400 |
| commit | 9114ec801c3c539c0c8103c5be2b1f27b0e5e0bf (patch) | |
| tree | 9600d1438a441e9ef3e2995d1ff803e6ec329a04 /src | |
| parent | 411a18999fe8e8bd2929d42d10e60df043a29475 (diff) | |
prevent scrolling when interacting with nested content in GridView
Diffstat (limited to 'src')
| -rw-r--r-- | src/client/views/collections/collectionGrid/CollectionGridView.tsx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/client/views/collections/collectionGrid/CollectionGridView.tsx b/src/client/views/collections/collectionGrid/CollectionGridView.tsx index dd4e28e33..1ce75dd28 100644 --- a/src/client/views/collections/collectionGrid/CollectionGridView.tsx +++ b/src/client/views/collections/collectionGrid/CollectionGridView.tsx @@ -171,7 +171,6 @@ export class CollectionGridView extends CollectionSubView(GridSchema) { onClick={this.onChildClickHandler} renderDepth={this.props.renderDepth + 1} parentActive={this.props.active} - display={"contents"} // this causes an issue- this is the reason the decorations box is weird with images and web boxes />; } @@ -289,7 +288,7 @@ export class CollectionGridView extends CollectionSubView(GridSchema) { style={{ // marginLeft: NumCast(this.props.Document._xMargin), marginRight: NumCast(this.props.Document._xMargin), // marginTop: NumCast(this.props.Document._yMargin), marginBottom: NumCast(this.props.Document._yMargin), - pointerEvents: !this.props.isSelected() && this.props.renderDepth !== 0 && !this.props.ContainingCollectionView?._isChildActive && !SnappingManager.GetIsDragging() ? "none" : undefined + pointerEvents: !this.props.active() && !SnappingManager.GetIsDragging() ? "none" : undefined }} ref={this.createDashEventsTarget} onPointerDown={e => { @@ -313,7 +312,10 @@ export class CollectionGridView extends CollectionSubView(GridSchema) { } <div className="collectionGridView-gridContainer" ref={this.containerRef} - onScroll={action(e => this._scroll = e.currentTarget.scrollTop)} + onScroll={action(e => { + if (!this.props.isSelected()) e.currentTarget.scrollTop = this._scroll; + else this._scroll = e.currentTarget.scrollTop; + })} onWheel={e => e.stopPropagation()} > <input className="rowHeightSlider" type="range" value={NumCast(this.props.Document.rowHeight)} onPointerDown={this.onSliderDown} onPointerUp={this.onSliderUp} onChange={this.onSliderChange} style={{ width: this.props.PanelHeight() - 40 }} min={1} max={this.props.PanelHeight() - 40} onPointerEnter={e => e.currentTarget.focus()} /> |
