# HG changeset patch # User Nicholas Jillings # Date 1433151101 -3600 # Node ID 9a2a90168fd93896f77c44997b8589a9755a428e # Parent 61f8e66d119d7234954d4f508d1ca7b0c31eea4a Feature #1230: Popup content question entries now have automatic focus diff -r 61f8e66d119d -r 9a2a90168fd9 core.js --- a/core.js Mon Jun 01 10:16:04 2015 +0100 +++ b/core.js Mon Jun 01 10:31:41 2015 +0100 @@ -108,9 +108,10 @@ this.popupContent.appendChild(span); this.popupContent.appendChild(br); this.popupContent.appendChild(textArea); + this.popupContent.childNodes[2].focus(); } this.popupContent.appendChild(this.popupButton); - } + }; this.initState = function(node) { //Call this with your preTest and postTest nodes when needed to @@ -129,7 +130,7 @@ this.showPopup(); this.postNode(); } - } + }; this.buttonClicked = function() { // Each time the popup button is clicked! @@ -170,7 +171,7 @@ } advanceState(); } - } + }; } function advanceState()