Commit 1cf729b4 authored by Adrian Wuillemet's avatar Adrian Wuillemet
Browse files

#65 Autoselect all text inside a label

parent 3c5ac7b5
......@@ -273,11 +273,11 @@ function make_editable(selection, field) {
.attr("height", h);
let input = fo.append("xhtml:form")
.append("input")
.classed("label-input", true)
.style("width", w + "px")
.style("height", h + "px")
.attr("type", "text")
.attr("value", function () { this.focus(); return d[field]; });
.attr("value", d[field])
.classed("label-input", function () { this.focus(); this.select(); return true});
input.on("blur", function () { fo.remove(); });
input.on("keypress", function () {
let e = d3.event;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment