i open my page in chrome,if i click the diagram region,the page will scroll down .
It’s something that most browsers do when an HTML element gets focus. It’s not behavior implemented by GoJS.
ok.i know.Thank you all the same
For 1.7 and after, try:
myDiagram.doFocus = function() {
var x = window.scrollX || window.pageXOffset;
var y = window.scrollY || window.pageYOffset;
go.Diagram.prototype.doFocus.call(this);
window.scrollTo(x, y);
}
This will let it focus, but stop the scrolling. It seems to work on Chrome, Firefox, IE11, and iOS Safari
In version 1.8 we introduced this property:
Its default value is false.
So you should not be using the above work-around.