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?
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:Diagram | GoJS API
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.
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!
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.