Using jQuery UI dialogs after updating to WebViewer 3.0

13 views
Skip to first unread message

Matt Parizeau

unread,
Nov 2, 2017, 1:56:08 PM11/2/17
to PDFTron WebViewer
Q:

I have a dialog that I create in my config file that looks something like this:

overlayMessage.dialog({
    dialogClass
: 'no-title',
    draggable
: false,
    resizable
: false,
    modal
: true,
    minHeight
: 50,
    minWidth
: window.innerWidth / 3,
    show
: {
        effect
: 'fade',
        duration
: 400
   
},
    hide
: {
        effect
: 'fade',
        duration
: 5000
   
}
});

However I'm receiving an error about "getClientRects is not a function", which looks to be a problem with jQuery UI. What is the way to fix this error?

A:

You can add "position" as an option to your dialog call:
overlayMessage.dialog({
  dialogClass
: 'no-title',
 
....
  position
: {
    within
: document.body
 
}
});

Reply all
Reply to author
Forward
0 new messages