We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9bfe889 + c8699c5 commit f4b0ccdCopy full SHA for f4b0ccd
src/components/NewSnippet.jsx
@@ -21,7 +21,10 @@ class NewSnippet extends React.Component {
21
syntax: '', // eslint-disable-line react/no-unused-state
22
};
23
this.onKeyPress = (e) => {
24
- if (e.which === 13) { e.preventDefault(); }
+ if (e.which === 13) { // keyCode for Enter button
25
+ e.preventDefault();
26
+ e.stopPropagation();
27
+ }
28
29
this.postSnippet = this.postSnippet.bind(this);
30
this.onSyntaxClick = this.onSyntaxClick.bind(this);
@@ -85,6 +88,7 @@ class NewSnippet extends React.Component {
85
88
placeholder="Tags"
86
89
onAdded={this.onTagAdded}
87
90
onRemoved={this.onTagRemoved}
91
+ uniqueTags
92
/>
93
</div>
94
<div className="new-snippet-code">
0 commit comments