IE6 issue with textarea + UI dialog

IE6 issue with textarea + UI dialog


I try to finish these plugins
http://maxb.net/blog/2009/02/26/dokuwiki-jquery-ui-autocomplete/
I want to use jQuery UI Dialog to write a link (internal & external)
and put the value in the dokuwiki textarea.
But I found a big problem.
When the focus goes in another form field Internet explorer 6 looses
"caret".
I tested this
alert(document.selection.createRange().text);
if I select something in the textarea, open the dialog window (jQUERY
UI not popup) and press the button "ok", alert return the selection in
then textarea.
if I select something in the textarea, open the dialog window (jQUERY
UI not popup) then write something in the input field of the Dialog
and at least press "ok" the alert return an empty value (loosing the
value of the selection).
The problem causes the insert of the value at the top of textarea.
So, if is not possible to solve the problem,
... I leave this solution jQuery based and make the same thing with a
classic popup.
Like dokuwiki mediamanager.
Thanks for help.
Max
PS: sorry for my english