Skip to content

Commit

Permalink
Fix clipboard regression instroduced by aframevr#638, resolve the col…
Browse files Browse the repository at this point in the history
…lapsible behavior in another way
  • Loading branch information
vincentfretin committed Dec 24, 2022
1 parent 24b9a72 commit 1666568
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
4 changes: 3 additions & 1 deletion src/components/Collapsible.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ export default class Collapsible extends React.Component {
};
}

toggleVisibility = () => {
toggleVisibility = (event) => {
// Don't collapse if we click on actions like clipboard
if (event.target.nodeName === 'A') return;
this.setState({ collapsed: !this.state.collapsed });
if (typeof ga !== 'undefined') {
ga('send', 'event', 'Components', 'collapse');
Expand Down
5 changes: 0 additions & 5 deletions src/components/components/CommonComponents.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,9 @@ export default class CommonComponents extends React.Component {
<img src={GLTFIcon} />
</a>
<a
href="#"
title="Copy entity HTML to clipboard"
data-action="copy-entity-to-clipboard"
className="button fa fa-clipboard"
onClick={(event) => {
event.preventDefault();
event.stopPropagation();
}}
/>
</div>
);
Expand Down
5 changes: 0 additions & 5 deletions src/components/components/Component.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,6 @@ export default class Component extends React.Component {
data-action="copy-component-to-clipboard"
data-component={subComponentName || componentName}
className="button fa fa-clipboard"
href="#"
onClick={(event) => {
event.preventDefault();
event.stopPropagation();
}}
/>
<a
title="Remove component"
Expand Down

0 comments on commit 1666568

Please sign in to comment.