mirror of
https://github.com/jsbin/jsbin.git
synced 2026-02-01 16:46:05 +00:00
Pass focus events from runner to renderer.
This commit is contained in:
parent
f6bb08f1d2
commit
f7586af8bc
@ -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;
|
||||
|
||||
}());
|
||||
|
||||
@ -226,6 +226,11 @@ var sandbox = (function () {
|
||||
});
|
||||
});
|
||||
|
||||
// Notify the parent of a focus
|
||||
addEvent(childWindow, 'focus', function () {
|
||||
runner.postMessage('focus');
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
return sandbox;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user