Skip to content

Commit

Permalink
selecting device names/labels shoudn't be allowed
Browse files Browse the repository at this point in the history
Signed-off-by: hriday-panchasara <hriday.panchasara@ericsson.com>
  • Loading branch information
hriday-panchasara authored and bhufmann committed Feb 8, 2022
1 parent d6167fc commit dc83bdd
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export abstract class AbstractTreeOutputComponent<P extends AbstractOutputProps,

renderMainArea(): React.ReactNode {
return <React.Fragment>
<div ref={this.treeRef} className='output-component-tree'
<div ref={this.treeRef} className='output-component-tree disable-select'
style={{ width: this.getTreeWidth(), height: this.props.style.height }}
>
{this.renderTree()}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export class DataTreeOutputComponent extends AbstractOutputComponent<AbstractOut
renderMainArea(): React.ReactNode {
return <React.Fragment>
{this.state.outputStatus === ResponseStatus.COMPLETED ?
<div ref={this.treeRef} className='output-component-tree'
<div ref={this.treeRef} className='output-component-tree disable-select'
style={{ height: this.props.style.height, width: this.props.widthWPBugWorkaround }}
>
{this.renderTree()}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class NullOutputComponent extends AbstractOutputComponent<NullOutputProps
const treeWidth = Math.min(this.getMainAreaWidth(), this.props.style.sashOffset + this.props.style.sashWidth);
const chartWidth = this.getMainAreaWidth() - treeWidth;
return <React.Fragment>
<div className='output-component-tree'
<div className='output-component-tree disable-select'
style={{ width: treeWidth, height: this.props.style.height }}
>
{''}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export class ReactAvailableViewsWidget extends React.Component<ReactAvailableVie
const totalHeight = this.getTotalHeight();
return (
<div className='trace-explorer-views'>
<div className='trace-explorer-panel-content'>
<div className='trace-explorer-panel-content disable-select'>
<AutoSizer>
{({ width }) =>
<List
Expand Down
7 changes: 7 additions & 0 deletions packages/react-components/style/output-components-style.css
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@
z-index: -1;
}

.disable-select {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}

.output-component-tree {
white-space: pre-wrap;
}
Expand Down

0 comments on commit dc83bdd

Please sign in to comment.