Commit 03ed543b authored by Robert Knight's avatar Robert Knight

Fix error when focusing groups whose hash IDs started with a number

The hash ID was not quoted when constructing the selector
used to find the group's link field in order to focus it,
resulting in an error depending on the chars in the hash ID.
parent 83694ba0
...@@ -50,7 +50,9 @@ function groupList(groups, $window) { ...@@ -50,7 +50,9 @@ function groupList(groups, $window) {
// wait for the share link field to be revealed and then select // wait for the share link field to be revealed and then select
// the link's text // the link's text
setTimeout(function() { setTimeout(function() {
var activeShareLinkField = elem[0].querySelector('.share-link-field[data-group-id=' + activeGroupId + ']'); var shareLinkSelector = '.share-link-field[data-group-id="' +
activeGroupId + '"]';
var activeShareLinkField = elem[0].querySelector(shareLinkSelector);
activeShareLinkField.focus(); activeShareLinkField.focus();
activeShareLinkField.select(); activeShareLinkField.select();
}, 0); }, 0);
......
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