diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2020-06-16 16:55:55 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2020-06-16 16:55:55 +0200 |
commit | 2cf928d0af9674c7a4d20eed4c10494608157312 (patch) | |
tree | 85fec2be30209d4b22bd78bc3f3661276ee4acd4 | |
parent | a0c7776dc0f97c5ef6ba64e30d1f3cf2eb7c35d2 (diff) |
Make html content of descriptions click-through to be able to edit them with double-click.
-rw-r--r-- | src/ws/node.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ws/node.js b/src/ws/node.js index 439165b..b99882b 100644 --- a/src/ws/node.js +++ b/src/ws/node.js @@ -271,6 +271,15 @@ function checkHTML(html) return true; } +function makeClickthrough(e) +{ + var elements = e.getElementsByTagName("*"); + for(let element of elements) + { + element.style.pointerEvents = "none"; // enable clickthrough to parent + } +} + Node.prototype.setAttribute = function(name, value) { this.attributes[name] = value; @@ -295,6 +304,7 @@ Node.prototype.setAttribute = function(name, value) { // Insert as HTML this.description_element.innerHTML = value; + makeClickthrough(this.description_element); } else { |