mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Cut when no selection should just return NS_OK (not error which causes JS to throw an error); bug 178725, r=akkana, sr=kin
This commit is contained in:
parent
d4312f5223
commit
b57b38a037
@ -78,7 +78,6 @@
|
|||||||
#include "nsISupportsArray.h"
|
#include "nsISupportsArray.h"
|
||||||
#include "nsVoidArray.h"
|
#include "nsVoidArray.h"
|
||||||
#include "nsFileSpec.h"
|
#include "nsFileSpec.h"
|
||||||
#include "nsIFile.h"
|
|
||||||
#include "nsIURL.h"
|
#include "nsIURL.h"
|
||||||
#include "nsIComponentManager.h"
|
#include "nsIComponentManager.h"
|
||||||
#include "nsIServiceManager.h"
|
#include "nsIServiceManager.h"
|
||||||
@ -1394,7 +1393,7 @@ NS_IMETHODIMP nsPlaintextEditor::Cut()
|
|||||||
|
|
||||||
PRBool isCollapsed;
|
PRBool isCollapsed;
|
||||||
if (NS_SUCCEEDED(selection->GetIsCollapsed(&isCollapsed)) && isCollapsed)
|
if (NS_SUCCEEDED(selection->GetIsCollapsed(&isCollapsed)) && isCollapsed)
|
||||||
return NS_ERROR_NOT_AVAILABLE;
|
return NS_OK; // just return ok so no JS error is thrown
|
||||||
|
|
||||||
res = Copy();
|
res = Copy();
|
||||||
if (NS_SUCCEEDED(res))
|
if (NS_SUCCEEDED(res))
|
||||||
|
Loading…
Reference in New Issue
Block a user