JSFL Text Edit doesn't save

So, I’ve got a component that changes selected text fields case to Title, Sentence, or ALL CAPS.

Below is the code for all caps.

function fnAll(e:MouseEvent):void{
    var numItems:int = int(MMExecute("fl.getDocumentDOM().selection.length"));
    for(var i:int = 0; i < numItems; i++){
        if(MMExecute("fl.getDocumentDOM().selection["+i+"].elementType") == 'text'){
            var sTxt = MMExecute("fl.getDocumentDOM().selection["+i+"].getTextString(0)");
            var modTxt:String = sTxt.toUpperCase()

Pretty simple, yes? Well it works great in most cases, but today we found a bug.

If you open a file, change the text case, then save it without doing anything else: It doesn’t save the changes made with this control. If you change the case, then alter the file using the IDE (cut/paste the text, shift it, draw something and delete it, etc) THEN it saves the changes.

So it seems that the case alteration by itself is not recognized by the IDE, so it doesn’t think the file changed, and doesn’t actually save it.

How do I fix that? Can I fix that?