mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-22 04:13:06 +09:00
moebius#56: Fix: DataTransfer - Pasting image from clipboard fails in some cases
https://github.com/MoonchildProductions/moebius/pull/56
This commit is contained in:
parent
2f455353a4
commit
37c73e0634
13 changed files with 156 additions and 44 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue