PDA

View Full Version : In Safari, windows not being build correctly.



pdchapin
14 Feb 2011, 11:03 AM
I have problem with some code that runs fine in Firefox, but has problems in Safari and, I believe, Chrome. This is on a Mac. I've identified two problems so far. The first is that when I open a draggable window, it wouldn't drag in Safari. Second, when I open a second window, Firefox correctly puts the new window on top, but Safari leaves the first window on top, even though the only controls that work are those in the second window.

I have determined that the actual div tag generated is different. In Safari, the tag identifies the class as "x-window x-window-noborder" but Firefox "x-window x-window-noborder x-resizable-pinned". Safari also seems to give everything the same z-level of 11000 which probably explains where the second problem is coming from.

The basic configuration of the window is fairly simple,

this.displayWindow = new Ext.Window({
id:"displayWindow"+this.parent.loc_id,
title:this.parent.name,
items:[this.mainTabs],
y:60,
modal:false,
closable : true,
border: false,
closeAction:'hide',
shadow:false,
width:900,
height:600
});although admitted the underlying tab structure is pretty complex.

For the display problem I tried explicitly forcing the window toFront but that didn't do anything.

You can see the problem by going to http://www.ats.amherst.edu/paris2 and clicking on one of the location icons. The window that comes up "displayWindow[number]" should be draggable and is with Firefox.

A brief test indicates that I have the same problem with Windows' Safari.

So how is Safari different?

pdchapin
28 Feb 2011, 11:12 AM
First, the draggable problem seems to have gone away for no obvious reason. But I then realized that it wasn't loading data into the image grid properly. The problem appears to have been with the dataView. The view is opened a couple of times and I've discovered that if I destroy the view and then rebuild it the problems go away. This includes the problem with the window being left on top when I open a secondary window. Why I should need to do this with Chrome and Safari but not Firefox is not clear.