Bug 2158698

Summary: The paste command in VM console tab does not work with Firefox
Product: Container Native Virtualization (CNV) Reporter: Guohua Ouyang <gouyang>
Component: User ExperienceAssignee: Aviv Turgeman <aturgema>
Status: CLOSED MIGRATED QA Contact: Guohua Ouyang <gouyang>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.13.0CC: gouyang, lkladnit
Target Milestone: ---Flags: lkladnit: needinfo+
Target Release: 4.14.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-08-22 10:51:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Guohua Ouyang 2023-01-06 06:42:19 UTC
Description of problem:
The paste command in VM console tab does not work with Firefox, Chrome is okay

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. have a running vm
2. try paste command in VM console tab with Firefox
3.

Actual results:


Expected results:


Additional info:

Comment 2 Guohua Ouyang 2023-03-02 01:35:52 UTC
Checked it again, I could still see the issue. I notice that you're using local environment, could you check it on uit-413-dev directly with firefox?

Comment 4 Leon Kladnitsky 2023-03-07 08:40:37 UTC
Checked on remote cluster with FF 100.0.2 (64-bit) - the issue persists

Comment 8 Aviv Turgeman 2023-03-13 13:14:29 UTC
Hi guohua

I'm sorry but I think I mislead you on step 4 by mistake, it should be:
4. search the "dom.events.testing.asyncClipboard" prop and set it to true

I've also been investigating a different way to implement this paste operation, and there is no alternative API for copying and pasting into the clipboard that does not require the user to grant permission. Access to the clipboard is considered a sensitive operation and modern web browsers have implemented restrictions on this operation to protect user privacy and security.

The Clipboard API provides a secure and standardized way for web applications to access the clipboard with the user's permission. Without this permission, it would not be possible for web applications to copy and paste text from or to the clipboard.

Maybe to best way to handle this, is to disable this action and give a tooltip/help icon with instructions for the user to grant such permissions to enable this operation.

Comment 9 Leon Kladnitsky 2023-03-18 17:06:23 UTC
(In reply to Aviv Turgeman from comment #8)
> Hi guohua
> 
> I'm sorry but I think I mislead you on step 4 by mistake, it should be:
> 4. search the "dom.events.testing.asyncClipboard" prop and set it to true
> 
> I've also been investigating a different way to implement this paste
> operation, and there is no alternative API for copying and pasting into the
> clipboard that does not require the user to grant permission. Access to the
> clipboard is considered a sensitive operation and modern web browsers have
> implemented restrictions on this operation to protect user privacy and
> security.
> 
> The Clipboard API provides a secure and standardized way for web
> applications to access the clipboard with the user's permission. Without
> this permission, it would not be possible for web applications to copy and
> paste text from or to the clipboard.
> 
> Maybe to best way to handle this, is to disable this action and give a
> tooltip/help icon with instructions for the user to grant such permissions
> to enable this operation.

Yes, "dom.events.testing.asyncClipboard" worked for me. Still need to find a way to give this permission via Cypress. I found how to do it only in Chrome and Electron so far.