From 2cf928d0af9674c7a4d20eed4c10494608157312 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Tue, 16 Jun 2020 16:55:55 +0200 Subject: Make html content of descriptions click-through to be able to edit them with double-click. --- src/ws/node.js | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 { -- cgit v1.2.3