Hi all, I am using an non mainstream browser,(a webkit browser from Adobe AIR) the test page is the ckeditor demo page the full featured editor, the styles are on the last row on the toolbar.
The styles work but always the carret position is set on start ,so I can only enter styled text on top row, no idea why the carret position is reseted it could be some issue in the code.
Question: Where exactly I can find the code responsible for the styles toolbar buttons?
Update, I found that if I cancel the fire of the event saveSnapshot this isue is fixedm it seems to me that the undo plugin is the one that saves the state when this event is fire and is the problem, I am investigating to see if I find where the carret position,selection is reset
Update2 I stil could not find the code for the button that changes font color, also I am unable to find the spot that resets the selection , so I tried in the undo plugin to add a return in the save function but this did not solved the actual problem, also removed everything from the listener for the event saveSnapshot and the issue was not fixed , Could I somehow add a breakpoin when the selectionRange is changed?
Solution, the problem was the focus() functioality, I just prevent the focus (the beforeFocus event and my issue is solved
Thank you
My fix that fixes the issue
My fix that fixes the issue but breaks the undo is
function testDrag(){
editor.oldFire=editor.fire;
editor.fire=fixedFire;
}
function fixedFire(ev){
if(ev=="saveSnapshot"){
//'editor.oldFire("saveSnapshot");}
}
else
editor.oldFire(ev);
}
The issue is not the handlers for the event I disabled there, even if I fire a random event the issue ocures, if I use a setTimeOut and call the event a few seconds later I don't get the selection moved at the begining but the styles are not applyed and Undo is stil broken/disabled.
Firing the event by itself does not reproduce the issue , it seems to be a weird timing issue between the fire function and the styles code