Space support.

d6
Frode Petterson 2015-02-27 08:57:02 +01:00
parent fabde2f1ce
commit 037e26f42b
1 changed files with 6 additions and 1 deletions

View File

@ -766,7 +766,7 @@ H5P.openEmbedDialog = function ($element, embedCode, resizeCode, size) {
}).select();
// Expand advanced embed
$dialog.find('.h5p-expander').click(function () {
var expand = function () {
var $expander = H5P.jQuery(this);
var $content = $expander.next();
if ($content.is(':visible')) {
@ -778,6 +778,11 @@ H5P.openEmbedDialog = function ($element, embedCode, resizeCode, size) {
$content.show();
}
positionInner();
};
$dialog.find('.h5p-expander').click(expand).keypress(function (event) {
if (event.keyCode === 32) {
expand();
}
});
});