From 8ff0ac2a817f3d5b7cc58685949c09a8e41d9fa8 Mon Sep 17 00:00:00 2001 From: Arash Khajelou Date: Sat, 8 Jul 2017 20:49:58 +0430 Subject: [PATCH] the custom parent bug for positioning if you set the appendTo property to another tag instead of body, and if the container is scrollable, there will be a tiny bug for positioning on scrolled container, so if you add this line to the src , it will function well ! :) --- src/jquery.autocomplete.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/jquery.autocomplete.js b/src/jquery.autocomplete.js index 91afcab..fade17f 100644 --- a/src/jquery.autocomplete.js +++ b/src/jquery.autocomplete.js @@ -337,6 +337,7 @@ parentOffsetDiff = $container.offsetParent().offset(); styles.top -= parentOffsetDiff.top; + styles.top += containerParent.scrollTop; styles.left -= parentOffsetDiff.left; if (!that.visible){