Flyer53 / jsPanel3

A jQuery Plugin to create highly configurable floating panels, modals, tooltips, hints/notifiers or contextmenus for use in a backend solution and other web applications.
http://v3.jspanel.de/
Other
89 stars 21 forks source link

Glued to mouse cursor #57

Closed Orijit closed 7 years ago

Orijit commented 7 years ago

Hi

I was looking for a plugin with features to dock, maximize divs. I found this plugin to have the best performance when it comes to resizing.

Currently I am using 3.9.2 and in case there are multiple panels open, resizing them results in the panel gluing to the mouse cursor. Release notes mentioned fixing the issue but reproducible for me. I am using contentIframe to load the content.

I tried 3.10.0 but it has the same issue, along with gluing when a panel is dragged frantically using the titlebar. Reproducible with example 1 at http://jspanel.de/api/#option/contentIframe

Planning to use it in an upcoming application. Any help would be greatly appreciated.

Thanks

Flyer53 commented 7 years ago

Hey there, Yes, I'm aware of this issue that only appears when panel content includes an iFrame. Unfortunately I was not able to find a satisfying solution ... so far. I have a new approach in mind I need to test. If it works out as hoped it'll be part of a v 3.11 release. So please be patient ... for another two weeks or so. Hopefully not more.

Meanwhile I recomment the following workaround:

$.jsPanel({
    dragit: {
        start: function(){
            this.content[0].querySelector('iframe').style.pointerEvents = 'none';
        },
        stop: function(){
            this.content[0].querySelector('iframe').style.pointerEvents = 'auto';
        }
    },
    resizeit: {
        start: function(){
            this.content[0].querySelector('iframe').style.pointerEvents = 'none';
        },
        stop: function(){
            this.content[0].querySelector('iframe').style.pointerEvents = 'auto';
        }
    },
    // REST OF PANEL CONFIG
});

This workaround assumes that you use the built-in dragit/resizeit interactions but should work with jQuery UI draggable/resizable just as well. Please let me know whether this helps for now.

Regards, Stefan

Flyer53 commented 7 years ago

@Orijit Forget all of the above and try the preliminary v3.11.0 Seems to work fine in my basic tests. Let me know ...

Orijit commented 7 years ago

@Flyer53 The link is downloading 3.10.0

Flyer53 commented 7 years ago

@Orijit Oh sorry ... fixed ...

Orijit commented 7 years ago

Seems to be working fine. I'll be testing it with different use cases and report in case I encounter an issue.

This is great. Thanks a ton for all the help. 👍

Flyer53 commented 7 years ago

Just released v3.11.0 with the fix.