Focus being stolen

Apr 21, 2008 at 5:24 PM
I'm using the RTE control to compose email. The problem I'm having is that it is the third control on my page (To, Subject, then RTE), but it is stealing the focus from the first item. Any suggestions on how to fix this?

Thanks in advance,

Jim
Apr 22, 2008 at 8:06 PM
I haven't had to do this, but here are some things that come to minf. have you tried explicitely setting the focus to the desired control in the Page Load event? ie:
tbTitle.focus();

If this doesn't work you could set up a javascript load event and maybe setting the focus there would work.

I know the focus is being set in the rte code.... it probably shouldn't be. but maybe the above two suggestions will help as a workaround
May 1, 2008 at 8:34 PM
Thanks for the tips, but I haven't been able to get anything to work. I've tried several methods in addition, but I think my problem is that no matter what I do, I get InitRte(); as the last entry in my <script> section. I've looked through the code of the RTE to comment out the focus call, but there are many calls to focus and I'm not sure which one to comment out. Can you tell me which one to comment out? I'm guessing it's the call to this.GetWindow().focus() in RichTextEditor.prototype.Focus = function()?
May 5, 2008 at 2:49 PM
Yes I think you are correct, calls to the RichTextEditor classes Focus function are what to look for. The RTEStartup.js creates a RichTextEditor object called richeditor. I have modified this area so much it is difficult to remember exactly what happens where in the original version. But you are definetely on the right track.
Developer
Jun 17, 2008 at 12:31 PM
I've turned this into an issue.
Developer
Aug 15, 2008 at 1:41 AM
This is has been fixed with change set 16197.