Weird scrolling behaviour

Hello,

I got the following diagram:

The top red area is the header of the modal which contains the goJS canvas.
For some reason, the diagram jumps up, removing the red area and resulting in the following:

I would like to prevent the diagram from jumping. Any suggestions?

The position and size of the Diagram’s is entirely dependent on the size and position of the HTML DIV element that is hosting the diagram. You will need to debug that HTML/CSS/DOM.

Interestingly, setting a breakpoint on the scroll events does not hit the breakpoint. I really do not know where this weird behaviour is coming from. Anyways, I came up with a solution (altough its ugly)

I still got another problem: The canvas catches the scroll event if you try to scroll. I made it so that the modal will always be the size of the canvas, which means that the scrolling inside the canvas should be passed on to the modal. How can I do this?

There are several possibilities depending on what limitations you want to have in that diagram. Did you want to limit scroll bars? Did you want to limit user panning? What about the scroll wheel? What should happen if the user zooms?

Try setting:

More is at https://gojs.net/latest/intro/permissions.html

Also, consider this sample: https://gojs.net/latest/samples/absolute.html

I already limited everything, except for clicking on certain nodes (which opens some other window)
-No panning
-No zooming
-No selecting
It is completely read only when opened through my modal

I set every parameter you told me, but it still wont pass the scroll to the containing modal

In this example:
https://gojs.net/latest/samples/absolute.html
you can try to set your browser to touch and try to scroll with the mouse when dragging over the diagram, it does not work in this example. (F12 and the Ctrl+Shift+M sets chrome to touch)

https://gojs.net/latest/api/symbols/PanningTool.html#bubbles

Sorry about that – I’ll update the intro/permissions.html page.

I tried to set “bubbles” but there is no noticable difference.
I am sorry for those questions but I am hitting a wall with this bug and I do not have very much time left.

So this problem consists of two bugs:
bug #1:The Diagram jumps up by the height of the modal header when touching the diagram
bug #2: scrolling with touch does not work.

Earlier I said that I found an ugly solution to bug #1, but I really want to get rid of it because I am using “setTimeout” to programmatically trigger the click and scroll up again.
What i found out: it has to do with focus. If I click the canvas, it jumps down. If i scroll up (with mousewheel) afterwards and press the canvas again, it wont jump down. If, however, I press the area above the canvas(modal header) and afterwards the canvas again, it will jump down again.

I saw this property:https://gojs.net/latest/api/symbols/Diagram.html#scrollsPageOnFocus
but it is false by default, setting it to false explicitly does nothing obviously.

I also tried to use “preventDefault” on “focusIn” on the diagram (JQuery) but this did not work either.
Are there any other properties that have to do with focus and scrolling the page?

Bug #2 still remains, setting all those properties did not do the trick.

Is the behavior the same in all browsers? On an iPad or Android tablet or Surface or Windows laptop?

Can you set Diagram.isEnabled to false in your app? Or at least try it?

Precisely which version of GoJS are you using?

I tried with chrome and firefox: The jump behaviour does only happen in chrome.
scrolling is still not possible in any browser.

Thanks for pointing out the “isEnabled” part. Scrolling works by setting it. If i now had the possibility to still trigger click events on nodes(I need this behaviour to open a modal which shows me more information about the element), then this would be working perfectly!

I am using GoJS v2.0.2.

Hmmm, this might be a problem with Diagram.scrollsPageOnFocus no longer working. We’ll investigate.

I’d like to see this modal and experiment with it. Would you be able to put it up somewhere we can see it? For privacy, you can send us email instead, gojs @ our domain, nwoods.com

Setting up an enviroment for this modal and diagrams might prove difficult, I will talk to my supervisor about creating an account on our testing system for you. I will come back to this matter as soon as I can.

OK. If its a bug or scenario we’ve never seen before, we’re very interested in investigating.

I wrote an email to gojs@nwoods.com