Browse Source

Merge pull request #306 from goto-bus-stop/bugfix/dashboard-meta-submit

dashboard: Prevent submitting outer form while editing metadata
Artur Paikin 7 years ago
parent
commit
6ea700e981
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/plugins/Dashboard/FileCard.js

+ 2 - 2
src/plugins/Dashboard/FileCard.js

@@ -8,7 +8,7 @@ module.exports = function fileCard (props) {
 
   function tempStoreMeta (ev) {
     const value = ev.target.value
-    const name = ev.target.attributes.name.value
+    const name = ev.target.dataset.name
     meta[name] = value
   }
 
@@ -18,8 +18,8 @@ module.exports = function fileCard (props) {
       return html`<fieldset class="UppyDashboardFileCard-fieldset">
         <label class="UppyDashboardFileCard-label">${field.name}</label>
         <input class="UppyDashboardFileCard-input"
-               name="${field.id}"
                type="text"
+               data-name="${field.id}"
                value="${file.meta[field.id]}"
                placeholder="${field.placeholder || ''}"
                onkeyup=${tempStoreMeta} /></fieldset>`