Dragging floatbox = white?

Page: 1

Author Post
Member
Registered: Jan 2009
Posts: 24
Hello there,

If I drag floatbox, the content gets replaced with white color. I am not sure why (maybe browser compatibility...). Is there a specific reason for it? I would love to see my content move with the floatbox. Is there a way to enable/fix it?

Thanks.
Administrator
Registered: Aug 2008
Posts: 3382
Of course there's a reason for it. There's a reason for everything in floatbox's behaviour. ;)

In this case, for most browsers if the content displayed is a moderately complex iframed page, the constant re-rendering of that iframe content causes mouse events to be dropped, which causes the mouse location to get dissociated from the box location along with other undesireable behaviour. So iframe content is hidden during dragging to avoid these problems. Other content types remain displayed as it is only iframes that misbehave in this way.

Want to play with it? You can find line 919 in the dragonDrop function that says
if (that.currentItem.type === 'iframe' && !(that.ie || that.opera) && !content.visibility) content.visibility = 'hidden';

and rem out that line.

After that, drag around a complex iframe (google news is the one I use) and watch the fun. (Don't be too gentle.)

In fact, there's a problem in that line. In my original testing, IE and Opera behaved ok so there's an exclusion in that line that keeps the iframe content visible while dragging in those two browsers. My testing was inadequate. IE suffers the same dropped events problem. So it is recommended that you change that line to have no browser exemptions. Make it say
if (that.currentItem.type === 'iframe' && !content.visibility) content.visibility = 'hidden';
Member
Registered: Jan 2009
Posts: 24
Sorry for the delayed response, but thanks. And sorry for not realizing that there's a reason for everything in floatbox's behaviour. ;) And sorry if I made you write a lot.

Anyways, since I don't want to break floatbox and I don't white screen, I just disabled dragging. I have no need for it. I think that's better than other options.

Thanks admin.

Page: 1