I tried to listen to a keypress via Edge extension on an SSRS Report but as soon as I click into an input I do not get any console logs anymore, while seems to work on other pages. How to fix it?
Manifest
{
"name": "Test",
"version": "1.0.0",
"description": "test",
"manifest_version": 2,
"background": {
"scripts": ["js/background.js"],
"persistent": true
},
"content_scripts": [{
"matches": ["http://*/*", "https://*/*"],
"js": ["js/background.js"],
"run_at": "document_end"
}]
}
Background.js
document.addEventListener("keypress", function(event) {
console.log(event)
if(event.keyCode == 117)
{
document.querySelector("input[type='submit']").click()
}
});