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.
1 parent c84bdfa commit b837718Copy full SHA for b837718
src/CodeSnippetDisplay.tsx
@@ -348,11 +348,11 @@ export class CodeSnippetDisplay extends React.Component<
348
new_element.setSelectionRange(0, new_element.value.length);
349
350
new_element.onblur = (): void => {
351
+ new_element.replaceWith(target);
352
+
353
if (target.innerHTML !== new_element.value) {
354
const newPath = 'snippets/' + new_element.value + '.json';
355
- new_element.replaceWith(target);
-
356
contentsService.rename(oldPath, newPath);
357
this.props._codeSnippetWidgetModel.renameSnippet(
358
target.innerHTML,
0 commit comments