This is a migrated thread and some comments may be shown as answers.

Flicker when hiding and maximizing windows in Firefox

2 Answers 35 Views
Window
This is a migrated thread and some comments may be shown as answers.
Raheel Ashraf
Top achievements
Rank 1
Raheel Ashraf asked on 23 Apr 2010, 03:17 PM
This is the problem I am seeing, specifically with firefox - Working fine in IE8.

Scenario:
Basically I have bunch of windows (each window is displayed as maximized) and only one window is display at a time.
We have some buttons at the top of the page, to open the corresponding window. For instance:

Window1 , Window 2 , ...

when Window1 is clicked, it display Window 1 and when window2 is clicked, it ....All  of this is handled in the client side javascript code...

Code:
    

// windowName is name of the window to be displayed
   function displayWindow (windowName)  {
   var manager = GetRadWindowManager();
    
    var currentActiveWindow = manager.getActiveWindow();
    var current =  manager.GetWindowByName(
windowName
);


    // allWindows is the array that contains all window names    
       
    for(counter =0; counter < allWindows.length;counter++)
    {
        if(allWindows[counter] != 
windowName
)

        {
            manager.GetWindowByName(allWindows[counter]).hide();    // << Problem occurs here
        }

    }
      
    
    current.show();
    current.maximize();


Problem:

The problem seems to occur on the line I have indicated in the code. So for example, if Window1 is currently being displayed and I switch to window2, when it tries to hide window1, I see a little flicker in firefox, where I see a glimpse of window2 at the bottom and then its shown as maximized..


2 Answers, 1 is accepted

Sort by
0
Raheel Ashraf
Top achievements
Rank 1
answered on 28 Apr 2010, 05:18 PM
anyone??
0
Raheel Ashraf
Top achievements
Rank 1
answered on 28 Apr 2010, 06:00 PM
this solution worked for me..

// windowName is name of the window to be displayed
   function displayWindow (windowName)  {
   var manager = GetRadWindowManager();
    
    var currentActiveWindow = manager.getActiveWindow();
    var current =  manager.GetWindowByName(
windowName
);


    current.moveTo(0,0);
    current.maximize()
    current.show();


    // allWindows is the array that contains all window names    
       
    for(counter =0; counter < allWindows.length;counter++)
    {
        if(allWindows[counter] != 
windowName
)

        {
            manager.GetWindowByName(allWindows[counter]).hide();    // << Problem occurs here
        }

    }
      
    

Tags
Window
Asked by
Raheel Ashraf
Top achievements
Rank 1
Answers by
Raheel Ashraf
Top achievements
Rank 1
Share this question
or