I've created my own Dialog for creating Poll HTML and I need to open the dialog whenever someone tries to edit anything inside my Poll DIV. So I attached and EventListener to the EditorWindow.document which captures all keypress events and sends them to my keyHandler. Everything works nicely until I try and open the Dialog with my PollLink Command, IE and Firefox block the dialog. Any ideas?
Here's the code:
keyHandler=function(evt) {
evt = evt || window.event;
if (evt) {
var eSelected = FCK.Selection.MoveToAncestorNode( 'DIV' );
if ( eSelected.id.match(/poll\d+/) ) {
var oEditor = window.FCK ;
oEditor.Commands.GetCommand('PollLink').Execute();
}
}
return false;
}
Here's the code:
keyHandler=function(evt) {
evt = evt || window.event;
if (evt) {
var eSelected = FCK.Selection.MoveToAncestorNode( 'DIV' );
if ( eSelected.id.match(/poll\d+/) ) {
var oEditor = window.FCK ;
oEditor.Commands.GetCommand('PollLink').Execute();
}
}
return false;
}