tracker issue : CF-3292672

select a category, or use search below
(searches all categories and all time range)
Title:

CFWindow Opens Improperly on Safari When Window Is Partially Scrolled

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/

Reporter/Name(from Bugbase): Bob Blackman / Bob Blackman (Bob Blackman)

Created: 07/20/2012

Components: AJAX

Versions: 9.0

Failure Type:

Found In Build/Fixed In Build: 9.0 /

Priority/Frequency: Major / Some users will encounter

Locale/System: English / Mac 10.6 for Intel

Vote Count: 0

Also:   - Underlying window content improperly scrolls on ALL browsers when cfwindow opens.

Problem Description:

I have a page displaying artwork with each image listed vertically down the page.  Accompanying each image is a "View Larger Image" button that opens a CFWindow with the enlarged image.  The CFWindow is sized to fill the user's browser window, completely overlaying the initial page content.

When the user first opens the page and clicks on the top image, everything works as expected.  If she then closes the CFWindow and scrolls down, selects another image and clicks on the "View Larger Image" button, the CFWindow opens and fills the viewport again as expected.  However, when the CFWindow is closed, the underlying original window has been scrolled back up to the top of the page.  The user needs to scroll down the page to find the artwork that she had last viewed.  Each time the CFWindow is employed, the underlying window gets scrolled to the top.

If the user opens the page and scrolls down somewhat before clicking on a "View Larger Image" button, then CFWindow opens with it's bottom half hidden and part of the original page visible above it.  After closing the window and scrolling to another image, the CFWindow opens in the same relative position and the underlying window always scrolls to where ever it was when the first use of the "View Larger Image" button was clicked.

here's my code to create the CFWindow and open it:


<!--- create a hidden window to display larger images --->
<cfwindow name="maxi" center="true" closable="true" destroyonclose="false" draggable="true" height="500" initshow="false" modal="true"  
	resizable="true" width="500" headerstyle="background-color:##ccc;" bodystyle="background-color:##fff; padding:0; color:##111;" />


// called from view larger image button
showMaxi = function(width, height, iid){
	
	// get browser window max width and height
	var vpw = getViewportWidth();
	var vph = getViewportHeight()+36;

	//Get window object
	myWindow = ColdFusion.Window.getWindowObject('maxi');

	//resize the window and make visible      
	myWindow.setSize(vpw, vph);
	ColdFusion.Window.show('maxi');

	//use the center function to center the window.    
	//myWindow.center();
	
	// if the browser window could be made larger to display larger images, show a message to the user
	if (messageFlag == '' && ((screen.availWidth > vpw && vpw < 1439) || (screen.availHeight > vph && vph < 739))){
		messageWindow = ColdFusion.Window.getWindowObject('message');
		ColdFusion.Window.show('message');
		messageWindow.center();
		messageFlag = 'no';
	}
	
	//reload the window
	ColdFusion.navigate('?pid=23&iid=' + iid + '&vpw=' + (vpw - 44) + '&vph=' + (vph - 72) + '&messageflag=' + messageFlag, 'maxi');
	// vpw - 24 for left & right borders of 12px each and 20px left margin
	// vph - 32 for top and bottom margins and 20 px margins on top and bottom
} 


Steps to Reproduce:

Here's a link to a sample page:

http://williammcmahan.artluscious.com/page.cfm?pid=23&cid=15

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3292672

External Customer Info:
External Company:  
External Customer Name: bobcel
External Customer Email:  
External Test Config: My Hardware and Environment details:  Mac 10.6.8;  Safari 5.1.2;

Attachments:

Comments:

unable to reproduce the behavior with the test script below. The page does not scroll back up when the "maxi2" windows is closed. @ bobcel, please suggest if I am missing anything here. <cfwindow name="maxi1" center="false" closable="true" destroyonclose="false" draggable="true" height="500" initshow="false" modal="true" resizable="true" width="500" /> <cfform> <cfinput name="btn_show" type="button" value="show Window" OnClick="ColdFusion.Window.show('maxi1');"> </cfform> <!--- add multiple line of text below to introduce lines between windows.---> some text some text some text some text some text some text some text some text some text some text some text <cfwindow name="maxi2" center="false" closable="true" destroyonclose="false" draggable="true" height="500" initshow="false" modal="true" resizable="true" width="500" x='20' y='1500'/> <cfform> <cfinput name="btn_show" type="button" value="show Window" OnClick="ColdFusion.Window.show('maxi2');"> </cfform>
Comment by Piyush K.
18691 | December 30, 2013 05:49:19 AM GMT
The test case in my previous note works on Safari 8 / Windows 1 / CF11. the window does not scroll back to the top when the button window is closed. closing this.
Comment by Piyush K.
18692 | December 03, 2014 02:36:16 AM GMT