Skip to content

Commit

Permalink
Adjust link component
Browse files Browse the repository at this point in the history
  • Loading branch information
artf committed Dec 5, 2016
1 parent 00bc6ed commit c2d7311
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/dom_components/model/ComponentLink.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,17 @@ define(['./ComponentText'],
traits: ['title', 'href', 'target'],
}),

/**
* Returns object of attributes for HTML
* @return {Object}
* @private
*/
getAttrToHTML: function() {
var attr = Component.prototype.getAttrToHTML.apply(this, arguments);
delete attr.onmousedown;
return attr;
},

},{

/**
Expand Down
8 changes: 8 additions & 0 deletions src/dom_components/view/ComponentLinkView.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,13 @@ define(['backbone', './ComponentTextView'],
e.preventDefault();
},

render: function() {
ComponentView.prototype.render.apply(this, arguments);

// Avoid strange behaviours while try to drag
//this.$el.attr('onmousedown', 'return false');
return this;
},

});
});

0 comments on commit c2d7311

Please sign in to comment.