From 38e339258ccc391cc9ab021c31f63da3d0749b87 Mon Sep 17 00:00:00 2001 From: Jeremy Kersten Date: Thu, 22 Mar 2018 10:04:36 +0100 Subject: [FIX] base: settings view match on label.text Before this commit, search was broken because containsLike was searching on the innerHtml. (3dd93ed129) Settings use _wordHighlighter to change the background of the matching text into the label, so the label was not only text, but html. : looking for (mul) After this commit, the match is based on the text content and not on the html. --- addons/web/static/src/js/libs/jquery.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'addons/web/static/src/js/libs/jquery.js') diff --git a/addons/web/static/src/js/libs/jquery.js b/addons/web/static/src/js/libs/jquery.js index 0b12b4fed0d..4bcab8eb866 100644 --- a/addons/web/static/src/js/libs/jquery.js +++ b/addons/web/static/src/js/libs/jquery.js @@ -11,6 +11,9 @@ $.extend($.expr[':'], { containsLike: function (element, index, matches){ return element.innerHTML.toUpperCase().indexOf(matches[3].toUpperCase()) >= 0; }, + containsTextLike: function (element, index, matches){ + return element.innerText.toUpperCase().indexOf(matches[3].toUpperCase()) >= 0; + }, containsExact: function (element, index, matches){ return $.trim(element.innerHTML) === matches[3]; }, -- cgit v1.2.3