CuteEditor stealing focus

  •  12-29-2006, 12:50 PM

    CuteEditor stealing focus

    I have CuteEditor Focus property set as False.
     
    We have many base pages in our application that call other pages (essentially as pop-ups) via postback commands similar to this:
     
    s = "testpage.aspx"
    s = "<script>var win=null;win=window.open('" & s & "', 'popurl');win.focus();</script>"
    Response.Write(s)
     
    This code causes the called page to be displayed on top (via win.focus()) and the base page refreshes underneath on refresh without taking the focus.
     
    This is common code.
     
    However, any base page with a CuteEditor.Editor control on it steals the focus even when the Focus property is set to false. Therefore, when we call other pages in postback, the page containing the CuteEditor Editor control ENDS UP ON TOP instead of underneath the called page.
     
    We have tried everything to prevent this from happening, but cannot stop this action.
     
    Our observation shows that:
     
    1. The page with the CE editor on it refreshes first without the focus. This is the expected action.
    2. The called page then displays and takes the focus. This, too, is the expected action.
    3. The page with the CE editor then goes about preparing the content. This is happening after the called page displays on top of the base page.
    4. When the content is ready, CE Editor inserts the content into the editor window. For some unknown reason, this causes the page to take the focus again.
     
    The bug seems to be that CE on page refresh has to read the content and place it into the editor window after the base page containing the control displays in the browser.
     
    This takes time and doing this causes the page to take the focus thereby causing the display problem.
     
    We cannot use code to continually re-focus the called page, since that page sometimes calls other pages. The problem is with CuteEditor. It should not be causing the base page to take focus, particularly when another page has been given the focus.
     
    How to fix this?
     
     
     
View Complete Thread