Commit 91d6c8ee authored by Jono Mingard's avatar Jono Mingard
Browse files

Fix adding extra block when clicking on blocktype (Bug #1283869)



Also added move cursor back to blocktype buttons so that it's clearer
what mouse users are expected to do.

Change-Id: I6bc2a73674690e4a5007f9f59061f2035abca0c8
Signed-off-by: default avatarJono Mingard <jonom@catalyst.net.nz>
parent 679b5911
......@@ -407,7 +407,7 @@
$('.blocktype-list div.blocktype').each(function() {
$(this).find('.blocktypelink').on('click keydown', function(e) {
var keyCode = $.ui.keyCode;
if (e.type == 'click' || e.keyCode == keyCode.SPACE || e.keyCode == keyCode.ENTER) {
if ((e.type == 'click' && e.buttons > 0) || e.keyCode == keyCode.SPACE || e.keyCode == keyCode.ENTER) {
startAddBlock($(this));
}
});
......
......@@ -8,9 +8,8 @@
* This file is licensed under the same terms as Mahara itself
*/
.blocktype,
.blocktype-clone {
cursor: move;
}
.blocktype-clone,
.blocktype *,
form .blockinstance-header {
cursor: move;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment