Pass focus events from runner to renderer.

This commit is contained in:
Tom Ashworth 2013-06-28 11:49:37 +01:00
parent f6bb08f1d2
commit f7586af8bc
2 changed files with 14 additions and 0 deletions

View File

@ -200,6 +200,15 @@ var renderer = (function () {
};
}());
/**
* When the iframe focuses, simulate that here
*/
renderer.focus = function () {
$('#live').focus();
// also close any open dropdowns
closedropdown();
};
return renderer;
}());

View File

@ -226,6 +226,11 @@ var sandbox = (function () {
});
});
// Notify the parent of a focus
addEvent(childWindow, 'focus', function () {
runner.postMessage('focus');
});
};
return sandbox;