From b9d6fbb7410d692256f3161a96a42d31e82551f1 Mon Sep 17 00:00:00 2001 From: "rcassin%supernova.org" Date: Fri, 18 Aug 2000 01:34:22 +0000 Subject: [PATCH] Fix for 45645 (Can paste into ReadOnly textfield) r=akkana --- editor/base/nsHTMLEditor.cpp | 4 ++-- editor/libeditor/html/nsHTMLEditor.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/editor/base/nsHTMLEditor.cpp b/editor/base/nsHTMLEditor.cpp index 982908172908..2abaafbcef19 100644 --- a/editor/base/nsHTMLEditor.cpp +++ b/editor/base/nsHTMLEditor.cpp @@ -4988,8 +4988,8 @@ NS_IMETHODIMP nsHTMLEditor::Paste(PRInt32 aSelectionType) rv = PrepareTransferable(getter_AddRefs(trans)); if (NS_SUCCEEDED(rv) && trans) { - // Get the Data from the clipboard - if (NS_SUCCEEDED(clipboard->GetData(trans, aSelectionType))) + // Get the Data from the clipboard + if (NS_SUCCEEDED(clipboard->GetData(trans, aSelectionType)) && IsModifiable()) { rv = InsertFromTransferable(trans); } diff --git a/editor/libeditor/html/nsHTMLEditor.cpp b/editor/libeditor/html/nsHTMLEditor.cpp index 982908172908..2abaafbcef19 100644 --- a/editor/libeditor/html/nsHTMLEditor.cpp +++ b/editor/libeditor/html/nsHTMLEditor.cpp @@ -4988,8 +4988,8 @@ NS_IMETHODIMP nsHTMLEditor::Paste(PRInt32 aSelectionType) rv = PrepareTransferable(getter_AddRefs(trans)); if (NS_SUCCEEDED(rv) && trans) { - // Get the Data from the clipboard - if (NS_SUCCEEDED(clipboard->GetData(trans, aSelectionType))) + // Get the Data from the clipboard + if (NS_SUCCEEDED(clipboard->GetData(trans, aSelectionType)) && IsModifiable()) { rv = InsertFromTransferable(trans); }