diff options
author | Moonchild <mcwerewolf@gmail.com> | 2018-04-22 10:13:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-22 10:13:13 +0200 |
commit | c74754d23864569956853c1f77a37275842b0fd0 (patch) | |
tree | c858bde1c123fd2c73935d8cb811a6be364daf81 /editor/libeditor/TextEditorDataTransfer.cpp | |
parent | cbe93351ee1d924090fc689f85c657c3e1aac41d (diff) | |
parent | 306690e137c2bb031020ba3c2c1515ba731a23a5 (diff) | |
download | UXP-c74754d23864569956853c1f77a37275842b0fd0.tar UXP-c74754d23864569956853c1f77a37275842b0fd0.tar.gz UXP-c74754d23864569956853c1f77a37275842b0fd0.tar.lz UXP-c74754d23864569956853c1f77a37275842b0fd0.tar.xz UXP-c74754d23864569956853c1f77a37275842b0fd0.zip |
Merge pull request #225 from janekptacijarabaci/data-transfer_1
moebius#56: DataTransfer - Pasting image from clipboard fails in some cases
Diffstat (limited to 'editor/libeditor/TextEditorDataTransfer.cpp')
-rw-r--r-- | editor/libeditor/TextEditorDataTransfer.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/editor/libeditor/TextEditorDataTransfer.cpp b/editor/libeditor/TextEditorDataTransfer.cpp index 0388aa4a8..2cc2906fa 100644 --- a/editor/libeditor/TextEditorDataTransfer.cpp +++ b/editor/libeditor/TextEditorDataTransfer.cpp @@ -383,6 +383,13 @@ TextEditor::CanPaste(int32_t aSelectionType, NS_ENSURE_ARG_POINTER(aCanPaste); *aCanPaste = false; + // Always enable the paste command when inside of a HTML or XHTML document. + nsCOMPtr<nsIDocument> doc = GetDocument(); + if (doc && doc->IsHTMLOrXHTML()) { + *aCanPaste = true; + return NS_OK; + } + // can't paste if readonly if (!IsModifiable()) { return NS_OK; |