notebookbar: event prevent default for insert annotation button
problem: if writer->insert tab-> insert comment button is clicked, if button is clicked from icon is works fine, but if button is clicked on label event is triggered twice, which caused js errors Signed-off-by: Pranam Lashkari <lpranam@collabora.com> Change-Id: I3956083b02204733abc3543c73f6019d3a3b4c67pull/8416/head
parent
2d31aafa11
commit
537959188f
|
@ -943,7 +943,8 @@ L.Control.NotebookbarBuilder = L.Control.JSDialogBuilder.extend({
|
|||
_insertAnnotationControl: function(parentContainer, data, builder) {
|
||||
var control = builder._unoToolButton(parentContainer, data, builder);
|
||||
$(control.container).unbind('click.toolbutton');
|
||||
$(control.container).click(function () {
|
||||
$(control.container).click(function (e) {
|
||||
e.preventDefault();
|
||||
var docLayer = builder.map._docLayer;
|
||||
if (!(docLayer._docType === 'spreadsheet' && docLayer._hasActiveSelection)) {
|
||||
builder.map.insertComment();
|
||||
|
|
Loading…
Reference in New Issue