allow follow links in disabled state
This commit is contained in:
@ -60,20 +60,22 @@ Makes editable any HTML element on the page. Applied as jQuery method.
|
||||
if(this.options.toggle !== 'manual') {
|
||||
this.$element.addClass('editable-click');
|
||||
this.$element.on(this.options.toggle + '.editable', $.proxy(function(e){
|
||||
//prevent following link
|
||||
e.preventDefault();
|
||||
//prevent following link if editable enabled
|
||||
if(!this.options.disabled) {
|
||||
e.preventDefault();
|
||||
}
|
||||
|
||||
//stop propagation not required because in document click handler it checks event target
|
||||
//e.stopPropagation();
|
||||
|
||||
if(this.options.toggle === 'mouseenter') {
|
||||
//for hover only show container
|
||||
this.show();
|
||||
this.show();
|
||||
} else {
|
||||
//when toggle='click' we should not close all other containers as they will be closed automatically in document click listener
|
||||
var closeAll = (this.options.toggle !== 'click');
|
||||
this.toggle(closeAll);
|
||||
}
|
||||
}
|
||||
}, this));
|
||||
} else {
|
||||
this.$element.attr('tabindex', -1); //do not stop focus on element when toggled manually
|
||||
|
Reference in New Issue
Block a user