From a10e7de9a65e5faad2167a94da8cbafd0179e8ff Mon Sep 17 00:00:00 2001 From: aignatov-bio Date: Wed, 15 Jan 2020 17:19:56 +0100 Subject: [PATCH] Fix smart annotation window position --- app/assets/javascripts/sitewide/atwho_res.js.erb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/assets/javascripts/sitewide/atwho_res.js.erb b/app/assets/javascripts/sitewide/atwho_res.js.erb index 7dd0ebd13..21c1bd4b6 100644 --- a/app/assets/javascripts/sitewide/atwho_res.js.erb +++ b/app/assets/javascripts/sitewide/atwho_res.js.erb @@ -380,6 +380,9 @@ var SmartAnnotation = (function() { function init() { $(field) + .on("reposition.atwho", function(event, flag, query) { + query.$el.find('.atwho-view').css('left', (flag.left + $(window).scrollLeft()) + 'px'); + }) .atwho({ at: '@', callbacks: {