diff --git a/package.json b/package.json index f3d535b..d826601 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "selection_highlighter", - "version": "1.0.0", + "version": "1.0.1", "description": "browser highlighter for code analysis", "scripts": { "build": "webpack --config webpack.config.js", diff --git a/src/chrome_extension/manifest.json b/src/chrome_extension/manifest.json index 58b5068..b90badd 100644 --- a/src/chrome_extension/manifest.json +++ b/src/chrome_extension/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 2, "name": "Selection Highlighter", - "version": "2.32", + "version": "2.33", "description": "Highlight occurrences of selected text, with or without a keypress.", "options_page": "${OPTIONS_PAGE_PATH}/options_page.html", "content_scripts": [{ diff --git a/src/highlighter/highlighter.js b/src/highlighter/highlighter.js index 148ac39..172d79e 100644 --- a/src/highlighter/highlighter.js +++ b/src/highlighter/highlighter.js @@ -94,6 +94,9 @@ function initialize () { pressedKeys.splice(index, 1); } }); + window.addEventListener('blur', e => { + pressedKeys.splice(0, pressedKeys.length); + }); document.addEventListener('selectionchange', onSelectionChange);