I wrote the segment script two days ago. After adding float to a layer, I forgot to remove it. I directly used the script to change it to the absolute position: absolute and then set the coordinates...
Then Register The onclick event for the document object to trigger the display and hide the layer... so that safari3 and chrome will crash. safari4 has not been tested and does not know whether the bug still exists.
At that time, I found that as long as I clicked the mouse, I collapsed and thought it was a registration event issue .. I canceled the registered document. onclick event listening and then manuallyCodeRepeatedly calling this layer show hidden won't crash ....
I suddenly found that this problem would not occur if I removed the original brother Div of the layer in HTML. After repeated tests, I found the bug as follows:
When a div is floating and its brother node is a block element. if the DIV is not removed from the floating state, the DIV is set to absolute positioning, and then the browser event is used to call back the display and hiding of the layer... the WebKit engine (testing safari3 and chrome) will crash because it cannot figure out how to render the relationship between the layer and its brother Block Element !!!
So we only need to remember to set an element to absolute positioning before we can see if it has floating, if there is, we need to clear it...
Let's talk about the safari4 beta issue.
The following code is used in the function body:
Try {
Return OBJ;
}
Finally {
OBJ = NULL;
}
Both JS and C # Will return OBJ normally, and because we finally point OBJ to null, the closure will be reclaimed immediately, instead of extending its lifetime due to external references.
But this code is invalid in safari4. If so, null is returned ..