Fix bug 309467. r=jst, sr=neil
git-svn-id: svn://10.0.0.236/trunk@182569 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
91b335b9bb
commit
8ff3bd2db3
@ -142,6 +142,7 @@ static NS_DEFINE_CID(kFrameSelectionCID, NS_FRAMESELECTION_CID);
|
||||
static const PRInt32 DEFAULT_COLS = 20;
|
||||
static const PRInt32 DEFAULT_ROWS = 1;
|
||||
static const PRInt32 DEFAULT_ROWS_TEXTAREA = 2;
|
||||
static const PRInt32 DEFAULT_UNDO_CAP = 1000;
|
||||
|
||||
static nsINativeKeyBindings *sNativeInputBindings = nsnull;
|
||||
static nsINativeKeyBindings *sNativeTextAreaBindings = nsnull;
|
||||
@ -1748,6 +1749,12 @@ nsTextControlFrame::InitEditor()
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsITransactionManager> transMgr;
|
||||
mEditor->GetTransactionManager(getter_AddRefs(transMgr));
|
||||
NS_ENSURE_TRUE(transMgr, NS_ERROR_FAILURE);
|
||||
|
||||
transMgr->SetMaxTransactionCount(DEFAULT_UNDO_CAP);
|
||||
|
||||
if (IsPasswordTextControl()) {
|
||||
// Disable undo for password textfields. Note that we want to do this at
|
||||
// the very end of InitEditor, so the calls to EnableUndo when setting the
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user