Open
Bug 1614288
Opened 5 years ago
Updated 3 years ago
onpaste event and pasting of pdf file is working inconsistently when compared to chrome.
Categories
(Core :: DOM: Events, enhancement, P3)
Tracking
()
UNCONFIRMED
People
(Reporter: sph.prakash, Unassigned)
Details
(Keywords: parity-chrome)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:72.0) Gecko/20100101 Firefox/72.0
Steps to reproduce:
i implemeted a onPaste event handler and used the following code.
validatePasteItems = (clipBoardData, uploadCallback) => {
const { setAlert } = this.props
const { value } = this.state
const { items: pastedItems = [] } = clipBoardData
const totalItemsPasted = pastedItems.length
for (let i = 0; i < totalItemsPasted; i++) {
const pasteItem = pastedItems[i]
const { type: pastedFileType = "" } = pasteItem
if (pastedFileType && pastedFileType.indexOf("image") !== -1) {
let pastedFileBlob = pasteItem.getAsFile()// returns null if i paste a pdf file. in chrome it is working.
if (pastedFileBlob) {
//this is not executed.
}
}
}
}
Now copy a pdf file to clipboard, and paste into a text/textarea field.
Actual results:
the issue is, it is working in chrome , it is not working in firefox.
Expected results:
It should work consistently in browsers.
| Reporter | ||
Updated•5 years ago
|
Summary: onpaste pdf → onpaste event and pasting of pdf file is working inconsistently when compared to chrome.
Updated•5 years ago
|
Updated•5 years ago
|
Priority: -- → P3
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•