mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 09:25:56 +00:00
Article.unpack: add placeholder if data-content is empty
This commit is contained in:
@@ -169,7 +169,14 @@ define(["dojo/_base/declare"], function (declare) {
|
|||||||
if (row.hasAttribute("data-content")) {
|
if (row.hasAttribute("data-content")) {
|
||||||
console.log("unpacking: " + row.id);
|
console.log("unpacking: " + row.id);
|
||||||
|
|
||||||
row.select(".content-inner")[0].innerHTML = row.getAttribute("data-content");
|
const container = row.querySelector(".content-inner");
|
||||||
|
|
||||||
|
container.innerHTML = row.getAttribute("data-content").trim();
|
||||||
|
|
||||||
|
// blank content element might screw up onclick selection and keyboard moving
|
||||||
|
if (container.textContent.length == 0)
|
||||||
|
container.innerHTML += " ";
|
||||||
|
|
||||||
row.removeAttribute("data-content");
|
row.removeAttribute("data-content");
|
||||||
|
|
||||||
PluginHost.run(PluginHost.HOOK_ARTICLE_RENDERED_CDM, row);
|
PluginHost.run(PluginHost.HOOK_ARTICLE_RENDERED_CDM, row);
|
||||||
|
|||||||
Reference in New Issue
Block a user