This is an automated email from the ASF dual-hosted git repository. gerben pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-annotator.git
commit 9e36aafa1f4bb5199b42cfdf6cf77630ae99aa8f Author: Gerben <[email protected]> AuthorDate: Thu Sep 10 21:53:42 2020 +0200 Fix forgotten scope→Range change --- web/demo/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/demo/index.js b/web/demo/index.js index 25fa5b4..a821b89 100644 --- a/web/demo/index.js +++ b/web/demo/index.js @@ -127,7 +127,9 @@ async function onSelectionChange() { cleanup(); const selection = document.getSelection(); const range = selection.getRangeAt(0); - const selector = await describeTextQuote(range, source); + const scope = document.createRange(); + scope.selectNodeContents(source); + const selector = await describeTextQuote(range, scope); anchor(selector); }
