From 1cb5d9ff8cbf6c77393b09b0fbe3ba581d4b549e Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Mon, 2 Sep 2013 16:21:33 +0200 Subject: [PATCH] [FIX] boring bug that throws an exception in some cases when we use the middle-click bzr revid: nicolas.vanhoren@openerp.com-20130902142133-odxuddgbar4so3v7 --- addons/web/static/src/js/search.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/web/static/src/js/search.js b/addons/web/static/src/js/search.js index eab09cc24a0..6241fe6da28 100644 --- a/addons/web/static/src/js/search.js +++ b/addons/web/static/src/js/search.js @@ -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();