From 0cfdd9af8dbdca30930205c56b6dfa5552778029 Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Mon, 19 Aug 2019 17:12:25 -0500 Subject: [PATCH] Make the raw tags of custom map data selectable/copyable (close #6710) --- modules/ui/data_editor.js | 2 +- modules/ui/raw_tag_editor.js | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/ui/data_editor.js b/modules/ui/data_editor.js index fc8eb3f20..16943fb32 100644 --- a/modules/ui/data_editor.js +++ b/modules/ui/data_editor.js @@ -83,7 +83,7 @@ export function uiDataEditor(context) { .state('hover') ) .selectAll('textarea.tag-text') - .property('disabled', true) + .attr('readonly', true) .classed('readonly', true); } diff --git a/modules/ui/raw_tag_editor.js b/modules/ui/raw_tag_editor.js index 60b0b088d..1e28ec7f1 100644 --- a/modules/ui/raw_tag_editor.js +++ b/modules/ui/raw_tag_editor.js @@ -268,12 +268,16 @@ export function uiRawTagEditor(context) { items.selectAll('input.key') .attr('title', function(d) { return d.key; }) .call(utilGetSetValue, function(d) { return d.key; }) - .property('disabled', isReadOnly); + .attr('readonly', function(d) { + return isReadOnly(d) || null; + }); items.selectAll('input.value') .attr('title', function(d) { return d.value; }) .call(utilGetSetValue, function(d) { return d.value; }) - .property('disabled', isReadOnly); + .attr('readonly', function(d) { + return isReadOnly(d) || null; + }); items.selectAll('button.remove') .on('mousedown', removeTag); // 'click' fires too late - #5878