actionscript 3 - After enabling spell checking with Squiggly the delete key and arrow keys stop working -


after enabling squiggly on textflow delete key , arrow keys stop working. if click around or switch applications , switch starts work again. if not use squiggly @ delete , arrow keys work expected.

here code i'm using enable squiggly:

var locale:string = "en_us"; spelluifortlf.enablespelling(mytextflow, locale); 

has encountered , there fix?

it looks bug tlf or spelluifortlf class. in spelluifortlf class there method, "dospellingjob" called. after call want reselect selection in textflow.

    // customized spelluifortlf.as class     public function dospellingjob():void     {         if (_spellingenabled == false) return;          hh.clearsquiggles();         (var idx:int = 0; idx < mtextflow.flowcomposer.numcontrollers; idx++)         {             var testcontroller:containercontroller = mtextflow.flowcomposer.getcontrollerat(idx);              //if (getvalidfirstwordindextlf(testcontroller) != -1)                  spellcheckrangetlf(getvalidfirstwordindextlf(testcontroller), getvalidlastwordindextlf(testcontroller));         }          if (haseventlistener(event.complete)) {             dispatchevent(new event(event.complete));         }           if (keepfocusontextflow && !calledsetfocusonce) {             setfocusontextflowcontainer();             calledsetfocusonce = true;         }     }      public function setfocusontextflowcontainer():void {         //trace("setting focus on textflow");         var testcontroller:containercontroller;          if (mtextflow.flowcomposer) {             if (mtextflow.flowcomposer.numcontrollers) {                 testcontroller = mtextflow.flowcomposer.getcontrollerat(0);             }         }          flexglobals.toplevelapplication.stage.focus = null;          if (testcontroller) {             flexglobals.toplevelapplication.stage.focus = testcontroller.container;         }          if (mtextflow.interactionmanager) {             //mtextflow.flowcomposer.updateallcontrollers();             mtextflow.interactionmanager.setfocus();             var selectionstate:selectionstate = mtextflow.interactionmanager.getselectionstate();             //textobject(currentobject).textflow.interactionmanager.clearselection();             mtextflow.interactionmanager.selectrange(selectionstate.anchorposition, selectionstate.activeposition);         }     }        /**      * sets focus on first container controller on first composition complete.      * fix bug in situations delete , arrow keys not       * work after spell checking has been enabled before text flow composition       * has completed. there delay editing first time dictionary loads.       * */     public static var keepfocusontextflow:boolean;     public static var calledsetfocusonce:boolean;      public function spelluifortlf(textmodel:textflow, lang:string)     {                 ...         calledsetfocusonce = false;          if (keepfocusontextflow) {             setfocusontextflowcontainer();         }          ...     } 

Comments

Popular posts from this blog

java - Spring Data JPA: Why findOne(id) executing delete query internally? -

python - Mongodb How to add addtional information when aggregating? -

java - Incorrect order of records in M-M relationship in hibernate -