Skip to content

Commit 3b3ac22

Browse files
committed
Fix clipboard regression introduced by aframevr#638, resolve the collapsible behavior in another way
1 parent 24b9a72 commit 3b3ac22

File tree

3 files changed

+3
-11
lines changed

3 files changed

+3
-11
lines changed

src/components/Collapsible.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ export default class Collapsible extends React.Component {
2222
};
2323
}
2424

25-
toggleVisibility = () => {
25+
toggleVisibility = (event) => {
26+
// Don't collapse if we click on actions like clipboard
27+
if (event.target.nodeName === 'A') return;
2628
this.setState({ collapsed: !this.state.collapsed });
2729
if (typeof ga !== 'undefined') {
2830
ga('send', 'event', 'Components', 'collapse');

src/components/components/CommonComponents.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,14 +115,9 @@ export default class CommonComponents extends React.Component {
115115
<img src={GLTFIcon} />
116116
</a>
117117
<a
118-
href="#"
119118
title="Copy entity HTML to clipboard"
120119
data-action="copy-entity-to-clipboard"
121120
className="button fa fa-clipboard"
122-
onClick={(event) => {
123-
event.preventDefault();
124-
event.stopPropagation();
125-
}}
126121
/>
127122
</div>
128123
);

src/components/components/Component.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,6 @@ export default class Component extends React.Component {
153153
data-action="copy-component-to-clipboard"
154154
data-component={subComponentName || componentName}
155155
className="button fa fa-clipboard"
156-
href="#"
157-
onClick={(event) => {
158-
event.preventDefault();
159-
event.stopPropagation();
160-
}}
161156
/>
162157
<a
163158
title="Remove component"

0 commit comments

Comments
 (0)