Fixed the Computer updateFocus() interface to keep the page stable unless fScroll is explicitly set
This commit is contained in:
parent
c1b34a87ed
commit
2b24e710d2
5 changed files with 385 additions and 379 deletions
|
|
@ -506,10 +506,15 @@ CPU8080.prototype.setBinding = function(sHTMLType, sBinding, control, sValue)
|
|||
this.bindings[sBinding] = control;
|
||||
control.onclick = function onClickRun() {
|
||||
if (!cpu.cmp || !cpu.cmp.checkPower()) return;
|
||||
/*
|
||||
* We no longer pass true to these runCPU()/stopCPU() calls, on the theory that if the "run"
|
||||
* control is visible, then the computer is probably sufficiently visible as well; the problem
|
||||
* with setting fUpdateFocus to true is that it can jerk the web page around in annoying ways.
|
||||
*/
|
||||
if (!cpu.flags.fRunning)
|
||||
cpu.runCPU(true);
|
||||
cpu.runCPU();
|
||||
else
|
||||
cpu.stopCPU(true);
|
||||
cpu.stopCPU();
|
||||
};
|
||||
fBound = true;
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in a new issue