Problem solved.
https://xiaoxuekexue.github.io/frame.html Now ctrl-drag/shift-drag works by adding this line of code:
document.getElementById('frametest').focus();
So I don't think that the problem comes from glowscript library, the problem should be came HTML and event listener.
iframe tag (from test.html) loses focus, so it can't listen for event eventhough eventlistener exists.
Therefore, iframe should be focused first before using glowscript.
But here is the catch, focusing an iframe causes the window (iframe.html) to lose its focus.
When window loses focus, it can't listen for events anymore.
When I click the window (frame.html), ctrl-drag/shift-drag does not work anymore.
Maybe we can try this,
document.getElementById('frametest').addEventListener('mouseover', function () {
document.getElementById('frametest').focus();
});
document.getElementById('frametest').addEventListener('mouseleave', function () {
document.getElementById('frametest').blur();
});
But I am pretty sure there is a better solution, we don't need to add this everytime we embed the program in webpages.