KB118 MlkBookmarkSubmissionForm: Set descriptionInput.{innerText => value}.
Change-Id: Ie500e369fa414039bcb1a35aab6fcf456d84956c
diff --git a/build.xml b/build.xml
index 028c937..e2859db 100644
--- a/build.xml
+++ b/build.xml
@@ -136,6 +136,7 @@
<exec executable="./mvnw">
<arg value="clean"/>
</exec>
+ <delete dir="${web-dir}/.parcel-cache"/>
<delete dir="${web-dir}/node_modules"/>
<delete dir="${web-dir}/web_modules"/>
</target>
diff --git a/src/main/resources/META-INF/resources/bookmarks/MlkBookmarkSubmissionForm.js b/src/main/resources/META-INF/resources/bookmarks/MlkBookmarkSubmissionForm.js
index b4d21d3..84054d0 100644
--- a/src/main/resources/META-INF/resources/bookmarks/MlkBookmarkSubmissionForm.js
+++ b/src/main/resources/META-INF/resources/bookmarks/MlkBookmarkSubmissionForm.js
@@ -85,9 +85,6 @@
}
this.uriInput.addEventListener('blur', this.onUriBlur.bind(this));
- this.uriInput.value = this.uri || "";
- this.titleInput.value = this.titleText || "";
- this.descriptionInput.innerText = this.description || "";
}
get editedId() /*:number | null*/ {
@@ -145,7 +142,6 @@
this.uriSpinner.hidden = false;
this.uriSpinner.playing = true;
let searchParams = new URLSearchParams({'uri': this.uriInput.value});
- console.log(`/bookmarks/page-info?${searchParams.toString()}`);
let fetchUrl = new URL(`/bookmarks/page-info?${searchParams.toString()}`, document.URL);
let r = await fetch(fetchUrl, {headers: {"accept": "application/json"}});
this.uriSpinner.hidden = true;
@@ -176,7 +172,7 @@
this.visibilityInput.value = post.visibility;
if (post.texts['']) {
this.titleInput.value = post.texts[''].title;
- this.descriptionInput.innerText = post.texts[''].description;
+ this.descriptionInput.value = post.texts[''].description;
}
this.loaded = true;