Open Bug 1406718 Opened 7 years ago Updated 2 years ago

Cannot copy iframe text by using contentDocument.execCommand("copy")

Categories

(Core :: DOM: Editor, defect, P3)

58 Branch
defect

Tracking

()

UNCONFIRMED

People

(Reporter: kanatay01, Unassigned)

Details

Attachments

(1 file)

Attached file testcase
User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:58.0) Gecko/20100101 Firefox/58.0
Build ID: 20171007220156

Steps to reproduce:

1. Open the testcase.
2. Select "abc" on the iframe and select "123" on the parent document.
   -- Both "abc" and "123" are selected.
3. Click "Copy iframe text" button.
   -- The button executes document.querySelector("iframe").contentDocument.execCommand("copy").
4. Paste somewhere.



Actual results:

The pasted text is "123", which was copied from the parent document.



Expected results:

The pasted text is "abc", which was copied from the iframe.
Component: Untriaged → Editor
Product: Firefox → Core
Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: