Last Comment Bug 741734 - "paste withoug formatting" doesn't fire OnPaste event in contenteditable element
: "paste withoug formatting" doesn't fire OnPaste event in contenteditable element
Product: Core
Classification: Components
Component: Editor (show other bugs)
: 11 Branch
: x86_64 Linux
-- normal (vote)
: mozilla14
Assigned To: :Ehsan Akhgari
: Makoto Kato [:m_kato]
Depends on:
  Show dependency treegraph
Reported: 2012-04-03 03:38 PDT by Thomas Broyer
Modified: 2012-04-04 04:55 PDT (History)
4 users (show)
ehsan: in‑testsuite+
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Patch (v1) (2.02 KB, patch)
2012-04-03 10:41 PDT, :Ehsan Akhgari
roc: review+
Details | Diff | Splinter Review

Description User image Thomas Broyer 2012-04-03 03:38:57 PDT
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.1 Safari/536.5

Steps to reproduce:

Ctrl+Shift+V (on Windows or Linux; Cmd+Option+Shift+V on Mac) within a contenteditable div.

Actual results:

Text pasted without formatting, but no event is fired.

Expected results:

A paste event should have been fired.

Try it here
Comment 1 User image Thomas Broyer 2012-04-03 06:14:19 PDT
Paste and PasteTransferable both start with a call to FireClipboardEvent(NS_PASTE), but not PasteNoFormatting:
Comment 2 User image :Ehsan Akhgari 2012-04-03 10:41:42 PDT
Created attachment 611881 [details] [diff] [review]
Patch (v1)
Comment 3 User image Robert O'Callahan (:roc) (email my personal email if necessary) 2012-04-03 13:22:29 PDT
Comment on attachment 611881 [details] [diff] [review]
Patch (v1)

Review of attachment 611881 [details] [diff] [review]:

::: editor/libeditor/html/tests/test_bug410986.html
@@ +57,4 @@
>            synthesizeKey("V", {accelKey: true});
>            isnot(ed.innerHTML.indexOf("<span style=\"color: green;\">green text</span>"), -1,
>                  "Content should be pasted in HTML format");
> +          is(gPasteEvents, 2, "One paste event must be fired");

Fix string
Comment 5 User image Marco Bonardo [::mak] 2012-04-04 04:55:33 PDT

Note You need to log in before you can comment on or make changes to this bug.