diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-04-20 22:54:26 +0200 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-04-20 22:54:26 +0200 |
commit | 4549256c2b685782587f2ccad6a105c0392492c7 (patch) | |
tree | b4364b3e0c84ed2c812158e89054e2c57b47f962 /editor/libeditor/TextEditorDataTransfer.cpp | |
parent | 20a3f8c006445b176fa8559f6529c2cf3cb75b0d (diff) | |
download | UXP-4549256c2b685782587f2ccad6a105c0392492c7.tar UXP-4549256c2b685782587f2ccad6a105c0392492c7.tar.gz UXP-4549256c2b685782587f2ccad6a105c0392492c7.tar.lz UXP-4549256c2b685782587f2ccad6a105c0392492c7.tar.xz UXP-4549256c2b685782587f2ccad6a105c0392492c7.zip |
moebius#56: Fix: DataTransfer - Pasting image from clipboard fails in some cases
https://github.com/MoonchildProductions/moebius/pull/56
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; |