Bug 632215 - Make the caret ignore -moz-user-modify if we ask it to immediately, instead of waiting for the next caret paint timer; r=roc a=blocking-final+
authorEhsan Akhgari <ehsan@mozilla.com>
Thu, 10 Feb 2011 16:12:53 -0500
changeset 62305 3eaad34067e4003449252176acfb893b613c5e33
parent 62304 05e6ab25d30415dd7ab87423053abbb58126dc14
child 62306 7573d51778309110084e9cde781e0a27ab7c43a6
push idunknown
push userunknown
push dateunknown
reviewersroc, blocking-final
bugs632215
milestone2.0b12pre
Bug 632215 - Make the caret ignore -moz-user-modify if we ask it to immediately, instead of waiting for the next caret paint timer; r=roc a=blocking-final+
layout/base/nsCaret.cpp
--- a/layout/base/nsCaret.cpp
+++ b/layout/base/nsCaret.cpp
@@ -313,18 +313,18 @@ nsresult nsCaret::SetCaretDOMSelection(n
 }
 
 
 //-----------------------------------------------------------------------------
 void nsCaret::SetCaretVisible(PRBool inMakeVisible)
 {
   mVisible = inMakeVisible;
   if (mVisible) {
+    SetIgnoreUserModify(PR_TRUE);
     StartBlinking();
-    SetIgnoreUserModify(PR_TRUE);
   } else {
     StopBlinking();
     SetIgnoreUserModify(PR_FALSE);
   }
 }
 
 
 //-----------------------------------------------------------------------------