Skip to content

Commit

Permalink
fix: prevent special char. breaking
Browse files Browse the repository at this point in the history
  • Loading branch information
markhughes committed Jan 29, 2024
1 parent 3e171ce commit b5d3b86
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/client/lib/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -788,9 +788,10 @@ function entryRename(view, entry, wasEmpty, callback) {
let canSubmit = validFilename(linkText, droppy.platform);
entry.addClass("editing");

// Add inline element
const renamer = $(`<input type="text" class="inline-namer" value="${linkText
}" placeholder="${linkText}">`).insertAfter(link);
// Add inline element
const renamer = $('<input type="text" class="inline-namer">').val(linkText).attr("placeholder", linkText);
renamer.insertAfter(link);

renamer.off("input").on("input", function() {
const input = this.value;
const valid = validFilename(input, droppy.platform);
Expand Down

0 comments on commit b5d3b86

Please sign in to comment.