diff --git a/js/modal.js b/js/modal.js
index b60317e..33f071f 100644
--- a/js/modal.js
+++ b/js/modal.js
@@ -102,7 +102,7 @@
 
     // Position autocomplete results based on the scroll position of the modal.
     $('#modalContent .modal-content').delegate('input.form-autocomplete', 'keyup', function() {
-      $('#autocomplete').css('top', $(this).position().top + $(this).outerHeight() + $(this).closest('#modal-content').scrollTop());
+      $('#autocomplete').css('top', $(this).position().top + $(this).outerHeight() + $(this).offsetParent().filter('#modal-content').scrollTop());
     });
   };
 
