[FIX] boring bug that throws an exception in some cases when we use the middle-click

bzr revid: nicolas.vanhoren@openerp.com-20130902142133-odxuddgbar4so3v7
This commit is contained in:
niv-openerp 2013-09-02 16:21:33 +02:00
parent c20b5a8fcc
commit 1cb5d9ff8c
1 changed files with 2 additions and 0 deletions

View File

@ -241,6 +241,8 @@ my.InputView = instance.web.Widget.extend({
setTimeout(function () {
// Read text content (ignore pasted HTML)
var data = this.$el.text();
if (!data)
return;
// paste raw text back in
this.$el.empty().text(data);
this.el.normalize();