Set main workspace when scrollbar clicked. Issue #704

This commit is contained in:
Neil Fraser 2016-10-23 20:31:59 -07:00
parent 12e6a7a535
commit 6300faf85e

View file

@ -599,6 +599,7 @@ Blockly.Scrollbar.prototype.setVisible = function(visible) {
* @private
*/
Blockly.Scrollbar.prototype.onMouseDownBar_ = function(e) {
this.workspace_.markFocused();
Blockly.Touch.clearTouchIdentifier(); // This is really a click.
this.cleanUp_();
if (Blockly.isRightButton(e)) {
@ -638,6 +639,7 @@ Blockly.Scrollbar.prototype.onMouseDownBar_ = function(e) {
* @private
*/
Blockly.Scrollbar.prototype.onMouseDownHandle_ = function(e) {
this.workspace_.markFocused();
this.cleanUp_();
if (Blockly.isRightButton(e)) {
// Right-click.