summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/fields/basic_fields.js
diff options
context:
space:
mode:
authorNisha patel <nit@odoo.com>2020-03-23 13:03:00 +0000
committerBarad Mahendra <mba@openerp.com>2020-04-03 07:19:28 +0000
commit04af701f7658f260f81eb56f35fb64c4200b1e53 (patch)
tree4971f23102cb3c2890abe796036a57db18b12021 /addons/web/static/src/js/fields/basic_fields.js
parentbabbe363b6390fd7cbcc9d9f8db14716e0d2cc02 (diff)
[FIX] web: Fix the zoom image stick top on search of employee.
Currently, the Employee picture stays on top of the card of the employee we're looking for. The image does not disappear after a search is validated. Steps to reproduce: >> On employee kanban focus cursor on search panel, then mouse over to employee image so it will be zoomed, now without mouse leave just type in the search panel and enter, the big zoomed image stuck on screen and don't even know how to make it go away. So in this commit, We fix that on keudown hide the zoom image so when user search on search panel it will hide the zoom image. OnShow of zoom bind the generic even keydown and on that just hide the image so it should not stick on screen. TaskID : 2212808 Closes : #48253 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Diffstat (limited to 'addons/web/static/src/js/fields/basic_fields.js')
-rw-r--r--addons/web/static/src/js/fields/basic_fields.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/addons/web/static/src/js/fields/basic_fields.js b/addons/web/static/src/js/fields/basic_fields.js
index ce7a7fac07d..1f8362d090e 100644
--- a/addons/web/static/src/js/fields/basic_fields.js
+++ b/addons/web/static/src/js/fields/basic_fields.js
@@ -1824,6 +1824,7 @@ var FieldBinaryImage = AbstractFieldBinary.extend({
if(this.$zoom.height() < 256 && this.$zoom.width() < 256) {
this.hide();
}
+ core.bus.on('keydown', this, this.hide);
},
beforeAttach: function () {
this.$flyout.css({ width: '512px', height: '512px' });