Status Update
Comments
wo...@gmail.com <wo...@gmail.com> #2
Until this is fixed, can you use `window.print()` instead?
mi...@lipsurf.com <mi...@lipsurf.com> #3
@woxxom@gmail.com
Ctrl-p was just an example. My extension islipsurf.com - it lets users with disabilities define keyboard shortcuts and execute them with voice commands. Need to support things like ctrl-shift-a, ctrl-j etc.
Ctrl-p was just an example. My extension is
jh...@chromium.org <jh...@chromium.org> #4
[Empty comment from Monorail migration]
va...@chromium.org <va...@chromium.org> #5
[Empty comment from Monorail migration]
[Monorail components: Platform>Extensions]
[Monorail components: Platform>Extensions]
ka...@chromium.org <ka...@chromium.org> #6
Tested the issue on windows 10 using chrome version 99.0.4844.51 with the below steps
1.Open chrome://extenisons and open background page of extension
2.Copy pasted the code in console
3.Opened new tab withgoogle.com
4.Press Ctrl+P and able to see the print preview
Please find the attached screencast and confirm if anything missed here.
Request you please try the issue on latest chrome version and update the thread with observations
Thanks,
1.Open chrome://extenisons and open background page of extension
2.Copy pasted the code in console
3.Opened new tab with
4.Press Ctrl+P and able to see the print preview
Please find the attached screencast and confirm if anything missed here.
Request you please try the issue on latest chrome version and update the thread with observations
Thanks,
mi...@lipsurf.com <mi...@lipsurf.com> #7
@kavvaru@chromium.org
I'm afraid you misunderstood the reproduction steps. You do not press ctrl-p, the script in the background page simulates that. Let me be more clear:
1) opengoogle.com in a tab
2) go to chrome://extensions page
3) enable developer mode
4) open the background page for any extension
5) paste the code in the console and press enter
6) quickly switch to thegoogle.com tab in step 1
7) wait a few seconds
Expected:
Print preview dialog is opened
Actual:
Nothing happens in Chrome 98+
I'm afraid you misunderstood the reproduction steps. You do not press ctrl-p, the script in the background page simulates that. Let me be more clear:
1) open
2) go to chrome://extensions page
3) enable developer mode
4) open the background page for any extension
5) paste the code in the console and press enter
6) quickly switch to the
7) wait a few seconds
Expected:
Print preview dialog is opened
Actual:
Nothing happens in Chrome 98+
[Deleted User] <[Deleted User]> #8
Thank you for providing more feedback. Adding the requester to the cc list.
For more details visithttps://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
For more details visit
mi...@lipsurf.com <mi...@lipsurf.com> #9
Also, you should not be pasting the ``` part in the code. That was to format it, but seems not to work here. You should paste it like so:
setTimeout(() => {chrome.tabs.query({ active: true, currentWindow: true }, tabs => {
const tabId = tabs[0].id
const codesWModifiers = [{code: 80, modifiers: 2, key: 'p'}];
chrome.debugger.attach({ tabId }, "1.3", () => {
for (const item of codesWModifiers) {
const text = String.fromCharCode(item.code);
const ev = {
windowsVirtualKeyCode: item.code,
nativeVirtualKeyCode: item.code,
macCharCode: item.code,
// needed for pressing enter in contenteditables, and google search bar
unmodifiedText: text,
text: text,
// needed for pressing tab on forms to go to next field
key: text,
// seems unecessary
// code: "KeyP",
...(item.modifiers
? { modifiers: item.modifiers }
: undefined),
};
console.log("doing keydown,keyup for " + item.code);
chrome.debugger.sendCommand({ tabId }, "Input.dispatchKeyEvent", {
type: "rawKeyDown",
...ev,
}, () => {
// char needed for eg enter key in sheets
chrome.debugger.sendCommand({ tabId }, "Input.dispatchKeyEvent", {
type: "char",
...ev,
}, () => {
chrome.debugger.sendCommand({ tabId }, "Input.dispatchKeyEvent", {
type: "keyUp",
...ev,
});
});
});
}
})
})}, 4000);
setTimeout(() => {chrome.tabs.query({ active: true, currentWindow: true }, tabs => {
const tabId = tabs[0].id
const codesWModifiers = [{code: 80, modifiers: 2, key: 'p'}];
chrome.debugger.attach({ tabId }, "1.3", () => {
for (const item of codesWModifiers) {
const text = String.fromCharCode(item.code);
const ev = {
windowsVirtualKeyCode: item.code,
nativeVirtualKeyCode: item.code,
macCharCode: item.code,
// needed for pressing enter in contenteditables, and google search bar
unmodifiedText: text,
text: text,
// needed for pressing tab on forms to go to next field
key: text,
// seems unecessary
// code: "KeyP",
...(item.modifiers
? { modifiers: item.modifiers }
: undefined),
};
console.log("doing keydown,keyup for " + item.code);
chrome.debugger.sendCommand({ tabId }, "Input.dispatchKeyEvent", {
type: "rawKeyDown",
...ev,
}, () => {
// char needed for eg enter key in sheets
chrome.debugger.sendCommand({ tabId }, "Input.dispatchKeyEvent", {
type: "char",
...ev,
}, () => {
chrome.debugger.sendCommand({ tabId }, "Input.dispatchKeyEvent", {
type: "keyUp",
...ev,
});
});
});
}
})
})}, 4000);
ka...@chromium.org <ka...@chromium.org> #10
Tested the issue on windows 10 using chrome version 99.0.4844.51 as per the steps mentioned in https://crbug.com/chromium/1304416#c6 .
Not observed any print preview dailog after step 7.Please find the attached screencast for the same.
Observed the same behaviour in chrome version 97 and 96 as well.
Please check and confirm on the expected behaviour.
Thanks,
Not observed any print preview dailog after step 7.Please find the attached screencast for the same.
Observed the same behaviour in chrome version 97 and 96 as well.
Please check and confirm on the expected behaviour.
Thanks,
mi...@lipsurf.com <mi...@lipsurf.com> #11
@kavvaru@chromium.org
Sorry! I forgot to mention that the Chrome extension needs the "debugger" and "tabs" permissions. I think the easiest thing to do would be to modify the steps in this way:
1) Install an extension with "debugger" and "tabs" permissions (e.g.https://chrome.google.com/webstore/detail/lipsurf-voice-control-for/lnnmjmalakahagblkkcnjkoaihlfglon )
2) opengoogle.com in a tab
3) go to chrome://extensions page
4) enable developer mode
5) open the background page for the extension installed in 1)
6) paste the code in the console and press enter
7) quickly switch to thegoogle.com tab in step 1
8) wait a few seconds
If it doesn't work for some reason again, at the end of your screencast, could you show me the console output? E.g. after waiting a few seconds if the print preview dialog doesn't open on Chrome 97 or below, switch back to the console that you pasted the code.
Sorry! I forgot to mention that the Chrome extension needs the "debugger" and "tabs" permissions. I think the easiest thing to do would be to modify the steps in this way:
1) Install an extension with "debugger" and "tabs" permissions (e.g.
2) open
3) go to chrome://extensions page
4) enable developer mode
5) open the background page for the extension installed in 1)
6) paste the code in the console and press enter
7) quickly switch to the
8) wait a few seconds
If it doesn't work for some reason again, at the end of your screencast, could you show me the console output? E.g. after waiting a few seconds if the print preview dialog doesn't open on Chrome 97 or below, switch back to the console that you pasted the code.
[Deleted User] <[Deleted User]> #12
Thank you for providing more feedback. Adding the requester to the cc list.
For more details visithttps://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
For more details visit
ka...@chromium.org <ka...@chromium.org> #13
Sorry the provided extensions is blocked by our Admin.could you help us in providing any other example extension to triage this issue.
Thanks,
Thanks,
mi...@lipsurf.com <mi...@lipsurf.com> #14
OK here is a simple example extension. I've already included the code from above, so the new steps are simpler:
1) open agoogle.com tab
2) go to chrome://extensions
3) enable developer mode
4) load the attached extension
5) quickly go to the tab opened in 1)
6) wait less than 5s
1) open a
2) go to chrome://extensions
3) enable developer mode
4) load the attached extension
5) quickly go to the tab opened in 1)
6) wait less than 5s
[Deleted User] <[Deleted User]> #15
Thank you for providing more feedback. Adding the requester to the cc list.
For more details visithttps://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
For more details visit
ka...@chromium.org <ka...@chromium.org> #16
Still not able to add the unpacked extension as well.getting the same error blocked by admin.
Could any one from dev team please look into this issue.
ccing the dev from herehttps://source.chromium.org/chromium/chromium/src/+/main:extensions/OWNERS for help
Thanks,
Could any one from dev team please look into this issue.
ccing the dev from here
Thanks,
mi...@lipsurf.com <mi...@lipsurf.com> #17
Were you able to reproduce? Still having this issue...
[Deleted User] <[Deleted User]> #18
Thank you for providing more feedback. Adding the requester to the cc list.
For more details visithttps://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
For more details visit
ka...@chromium.org <ka...@chromium.org> #19
Yes still not able to reproduce the issue as am not able to add the provided extensions from chrome://extensions.
Getting Admin blocked error while adding.
Thanks,
Getting Admin blocked error while adding.
Thanks,
mi...@lipsurf.com <mi...@lipsurf.com> #20
@kavvaru, it seems like the 2 devs on the CC list are not active. Could you CC the other devs to see if one of them is active? Seems I don't have permission to CC.
[Deleted User] <[Deleted User]> #21
Thank you for providing more feedback. Adding the requester to the cc list.
For more details visithttps://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
For more details visit
ve...@chromium.org <ve...@chromium.org> #22
Tested the issue on latest chrome version #100.0.4896.60 using Win 11 as per https://crbug.com/chromium/1304416#c13 ,
Steps to reproduce
================
1) Openedwww.google.com tab
2) Go to chrome://extensions
3) Enabled developer mode
4) Loaded the attached extension
5) Quickly go to the tab opened in step 1
6) wait less than 5s
Observed there is an error on the console of background page in extension and extension showing disabled.
Print preview not getting stimulated by the script.
@Reporter: Could you please review the attached screencast and let us know if we missed anything from our end.
Screencast Link:https://watch.screencastify.com/v/2dqH2DHlqh8jwdwXJJko
Thanks!!
Steps to reproduce
================
1) Opened
2) Go to chrome://extensions
3) Enabled developer mode
4) Loaded the attached extension
5) Quickly go to the tab opened in step 1
6) wait less than 5s
Observed there is an error on the console of background page in extension and extension showing disabled.
Print preview not getting stimulated by the script.
@Reporter: Could you please review the attached screencast and let us know if we missed anything from our end.
Screencast Link:
Thanks!!
mi...@lipsurf.com <mi...@lipsurf.com> #23
@vedshree@chromium.org that error means that after 5s a chrome:// tab was active/focused. Simply reload the extension and quickly switch to the google.com tab. You won't see anything happen on Chrome 98+, but on Chrome 97 or lower the print preview will come up with the same steps.
[Deleted User] <[Deleted User]> #24
Thank you for providing more feedback. Adding the requester to the cc list.
For more details visithttps://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
For more details visit
ve...@chromium.org <ve...@chromium.org> #25
Able to reproduce the issue on latest chrome version #100.0.4896.60 using Windows 11 as per steps in c#0
Reproducible:
-----------------------
Stable - 100.0.4896.60
Beta - 101.0.4951.15
Dev - 102.0.4972.0
Canary -102.0.4983.0
Bisect Information:
---------------------------------
Good Build: 98.0.4739.0
Bad Build: 98.0.4740.0
CHANGELOG URL:https://chromium.googlesource.com/chromium/src/+log/b39945db4a8dc6e64556993c5a727c02a3c3d60c..e86364149d89a818fde00c5dbe67cc3be1e807c4
Change-Id: I4121ce81bbba679f5c98bc4c261d62ba86ebe434
Reviewed-on:https://chromium-review.googlesource.com/c/chromium/src/+/3301051
Suspect :https://chromium.googlesource.com/chromium/src/+/e86364149d89a818fde00c5dbe67cc3be1e807c4
@Danil Somsikov : Please help us in reassigning if this is not related to your change.
Attaching screencast for reference.
Good:https://watch.screencastify.com/v/83Pn74zp7rdIEvpFu7c7
Bad:https://watch.screencastify.com/v/Jx83gRukti11qdxYTgR1
Thanks...!
Reproducible:
-----------------------
Stable - 100.0.4896.60
Beta - 101.0.4951.15
Dev - 102.0.4972.0
Canary -102.0.4983.0
Bisect Information:
---------------------------------
Good Build: 98.0.4739.0
Bad Build: 98.0.4740.0
CHANGELOG URL:
Change-Id: I4121ce81bbba679f5c98bc4c261d62ba86ebe434
Reviewed-on:
Suspect :
@Danil Somsikov : Please help us in reassigning if this is not related to your change.
Attaching screencast for reference.
Good:
Bad:
Thanks...!
jm...@google.com <jm...@google.com> #26
[Empty comment from Monorail migration]
ds...@chromium.org <ds...@chromium.org> #27
This is working as intended. Chrome extensions should not be able to trigger browser-level commands via keyboard shortcuts.
mi...@lipsurf.com <mi...@lipsurf.com> #28
Hi @dsv@chromium.org.
This was working in Chrome versions 97 below and suddenly it doesn't work. I don't see how that can be "working as intended". My use case is for accessibility. People use my Chrome extension to access Chrome with their voice, and being able to press shortcut keys with their voice is critical. Without this feature, hundreds of thousands of people with motor disabilities will be excluded from using Chrome. Here is a list of shortcuts that stopped working that a user has sent me:
This was working in Chrome versions 97 below and suddenly it doesn't work. I don't see how that can be "working as intended". My use case is for accessibility. People use my Chrome extension to access Chrome with their voice, and being able to press shortcut keys with their voice is critical. Without this feature, hundreds of thousands of people with motor disabilities will be excluded from using Chrome. Here is a list of shortcuts that stopped working that a user has sent me:
da...@google.com <da...@google.com> #29
The fact that it stopped working is intended. The fact that extensions could trigger browser-level shortcuts was not intended.
If I readhttps://support.microsoft.com/en-us/windows/windows-speech-recognition-commands-9d25ef36-994d-f367-a81a-a326160128c7#bkmk_keyboardwin11 correctly, there's OS-level support for triggering keyboard shortcuts with voice. Why people need to use a chrome extension for this purpose?
If I read
mi...@lipsurf.com <mi...@lipsurf.com> #30
Hi @danilsomsikov@google.com, great question. "The fact that extensions could trigger browser-level shortcuts was not intended." where is the document that describes that it was not intended? It certainly was a feature from our perspective. At the very least there was no deprecation notice, why did this not follow the deprecation policy?
> Why people need to use a chrome extension for this purpose?
Chrome OS. We have thousands of users, for example at schools, who use Chromebooks. They are not permitted to turn on the linux features and mess with developer settings to enable linux apps. They are locked down Chromebooks.
> Why people need to use a chrome extension for this purpose?
Chrome OS. We have thousands of users, for example at schools, who use Chromebooks. They are not permitted to turn on the linux features and mess with developer settings to enable linux apps. They are locked down Chromebooks.
ds...@chromium.org <ds...@chromium.org> #31
Unfortunately there isn't such a document. chrome.debugger API is based on internal Debugging protocol DevTools and browser automation tools like Puppeteer are using. Originally the entire protocol was available via this API regardless of whether it makes sense and is expected to be used by chrome extensions. I am sorry for that and I realize it is not fun to take away features that used to work, but having this functionality exposed constitutes a serious security risk for Chrome users and I don't think we can bring it back.
However I believe a11y is a very important issue and we need to find some kind of solution for ChromeOS users.
+dtseng do you have any ideas?
However I believe a11y is a very important issue and we need to find some kind of solution for ChromeOS users.
+dtseng do you have any ideas?
dt...@google.com <dt...@google.com> #32
Chrome OS provides a variety of built-in accessibility features. You can learn more here
https://support.google.com/chromebook/answer/177893?hl=en
Typically, users who need accessibility features require them to generalize beyond the web contents. For Chrome OS, this means interacting with system UI (such as the Launcher), Android apps, login screen, and more.
Using one's voice to drive the UI for Chrome OS is something we're actively working on. See some of our recently announced features regarding dictation here
https://www.google.com/chromebook/whatsnew/
Typically, users who need accessibility features require them to generalize beyond the web contents. For Chrome OS, this means interacting with system UI (such as the Launcher), Android apps, login screen, and more.
Using one's voice to drive the UI for Chrome OS is something we're actively working on. See some of our recently announced features regarding dictation here
mi...@lipsurf.com <mi...@lipsurf.com> #33
@dsv@chromium.org
"having this functionality exposed constitutes a serious security risk " isn't the point of permissions to let the users decide?
@dtseng@google.com
It's great that Chrome is working on their own version of a11y features. But it certainly leaves a bad taste in the mouth when you pull the rug from under other A11y apps by taking away a feature that has been there for ages and leave users with no choice but 1 a11y option... I think the users should be the ones to decide. The whole point of permissions is to balance power with security. These features were already under the debugger umbrella, which I understand maybe doesn't paint the full picture of what their capable of to casual users. Why not give the permission another description, like "control my computer - including pressing keyboard keys"?
"having this functionality exposed constitutes a serious security risk " isn't the point of permissions to let the users decide?
@dtseng@google.com
It's great that Chrome is working on their own version of a11y features. But it certainly leaves a bad taste in the mouth when you pull the rug from under other A11y apps by taking away a feature that has been there for ages and leave users with no choice but 1 a11y option... I think the users should be the ones to decide. The whole point of permissions is to balance power with security. These features were already under the debugger umbrella, which I understand maybe doesn't paint the full picture of what their capable of to casual users. Why not give the permission another description, like "control my computer - including pressing keyboard keys"?
ds...@chromium.org <ds...@chromium.org> #34
As you correctly pointed out, this feature is under the debugger umbrella. Generally chrome.debugger API is meant for building debugger-like tools. (As per https://developer.chrome.com/docs/extensions/reference/debugger/ "Use chrome.debugger to attach to one or more tabs to instrument network interaction, debug JavaScript, mutate the DOM and CSS, etc.")
We don't have any plans to introduce another extension API to control browser-wide behavior.
We don't have any plans to introduce another extension API to control browser-wide behavior.
mi...@lipsurf.com <mi...@lipsurf.com> #35
@dsv@chromium.org - doesn't necessarily need to be browser-wide behavior. What about a permission for keyboard emulation? In the same spirit there are keyboard apps for Android and iOS that have some set of permissions...
ha...@google.com <ha...@google.com> #36
[Empty comment from Monorail migration]
ha...@google.com <ha...@google.com> #37
[Empty comment from Monorail migration]
ha...@google.com <ha...@google.com> #38
[Empty comment from Monorail migration]
is...@google.com <is...@google.com> #39
This issue was migrated from crbug.com/chromium/1304416?no_tracker_redirect=1
[Monorail components added to Component Tags custom field.]
[Monorail components added to Component Tags custom field.]
Description
Chrome Version : 98.0.4758.80 (Official Build) (64-bit) and later
The Debugger API used to be able to press keyboard keys with modifiers (e.g. ctrl-p to bring up the printer dialog). Doesn't work in Chrome 98+, I've confirmed it works in Chrome 97, 95, 91...
(1) Enable developer mode for chrome://extensions, inspect the background page for any extension, paste this code in to the console, and switch to (focus) a normal tab within 4 seconds after pasting (e.g. google.com tab)
What is the expected result?
Pressing ctrl keys with the debugger API continues to work (it did before). With this example ctrl-p is pressed, so the print preview dialog should appear after a few seconds.
What happens instead?
Print dialog does not appear. Pressing ctrl keys does nothing.