qTip2 / qTip2

qTip2 - Pretty powerful tooltips
MIT License
2k stars 465 forks source link

new viewport breaks qtip #836

Open Gruski opened 6 years ago

Gruski commented 6 years ago

I upgraded from v2.2.0 (which worked fine) to v3.0.3. Both have Plugins: tips and viewport. The new Viewport plugin stops the tooltip from appearing. When I take just the viewport plugin code out of the library, the tooltip works again, albeit without the viewport functionality.

Here is my setup:

        $(function () {
            $(document).on('mouseover', '.NoteTooltip', function (event) {
                $(this).qtip({
                    overwrite: false,
                    content: { text: $(this).next('div') },
                    position: {
                        my: 'right center',
                        at: 'left center',
                        viewport: $(window),
                        adjust: { method: 'shift' }
                    },
                    show: { event: event.type, ready: true }
                }, event);
            })
        });

Looked over the docs to see if anything has changed that my current setup code could have been made it obsolete with new version but I can't see anything.

JamesWaldock commented 6 years ago

Are you using JQuery 3.x? Would #818 be relevant?

Gruski commented 6 years ago

Yes I updated to jquery 3.2.1 at the same time I updated to qtip v3.0.3 I read the other post but am not clear on what I have to do to fix.

kytosai commented 6 years ago

I have same error but i cannot fix it :( . I'm using jquery 3.2.1 . I want use qtip viewport check to good responsive size.

smuglet commented 6 years ago

Ditto. my temporary solution was to use viewport: true which default to using the "body" but not ideal.

I dug into it a little using chrome dev tools and it looks like when viewport is set to anything other than true it is not re-positioning the qtip so it remains offscreen at a location of -2888888 - 2888888 (not exactly what it said but I've closed the debug now.

cblaze22 commented 4 years ago

Same issue here, upgrade from 2 to 3, viewport not working anymore.