Index: lams_central/web/ckeditor/plugins/html5audio/plugin.js =================================================================== diff -u -r5a99d991bc12eb7f09938c99ae8d3f07a1729d45 -r091a2b538d13f42a153dc5d0137ea6caffbd983b --- lams_central/web/ckeditor/plugins/html5audio/plugin.js (.../plugin.js) (revision 5a99d991bc12eb7f09938c99ae8d3f07a1729d45) +++ lams_central/web/ckeditor/plugins/html5audio/plugin.js (.../plugin.js) (revision 091a2b538d13f42a153dc5d0137ea6caffbd983b) @@ -95,6 +95,12 @@ this.element.getChild( 0 ).setAttribute( 'controlslist', 'nodownload' ); } } + + //*LAMS* add padding around widget to increase area where user can double click and right click when trying to open html5audio dialog + var elementCssPadding = this.element.getStyle( 'padding').replace('px', ''); + if ( elementCssPadding < 10) { + this.element.setStyle( 'padding', '10px' ); + } } } ); @@ -118,5 +124,18 @@ } CKEDITOR.dialog.add( 'html5audio', this.path + 'dialogs/html5audio.js' ); + + editor.on( 'doubleclick', function( evt ) { + var element = evt.data.element; + + //check if it has parent with class .lams-bootpanel + if ( element && editor.elementPath( element ).contains( function( element ) { + if ( element.is( 'div' ) && element.hasClass( 'ckeditor-html5-audio' )) { + return true; + } + } )) { + evt.data.dialog = 'html5audio'; + } + } ); } } );