yuku / textcomplete

Autocomplete for HTMLTextAreaElement and more.
https://yuku.takahashi.coffee/textcomplete/
MIT License
1.74k stars 303 forks source link

On IE: Correct alignment of jquery-textcomplete-dropdown when scrolling down in iframe #310

Closed beuseli closed 7 years ago

beuseli commented 7 years ago

Dear yuku-t,

We like using jquery-textcomplete. We also added ckeditor to our application, both jquery-textcomplete and ckeditor work rather well together. However recently we discovered that the jquery-textcomplete-dropdown is not aligned correctly when the user is scrolling all the way down in the ckeditor.

We dug into code and found what was causing this. To position the dropdown jquery-textcomplete uses the scrollTop-property of the body-element inside the iframe. However on IE this property is always zero, this is a known issue: https://stackoverflow.com/questions/2717252/document-body-scrolltop-is-always-0-in-ie-even-when-scrolling This problem occurs whenever jquery-textcomplete is placed inside an iframe.

We fixed this by getting the scrollTop-property of the html-element inside the iframe . This works on IE and all other browsers.

We have made the following jsfiddles to illustrate our improvements: • Before (Not working correctly): https://jsfiddle.net/pbeuseli/kfehzeq7/ • After (Working correctly): https://jsfiddle.net/pbeuseli/jzqtys5k/

We know you are no longer maintaining this repository, but we hope you can make an exception for this issue, since this is rather important to us :-)

If you have any remarks please contact us.

yuku commented 7 years ago

Close in favor of 6186768661e6373fcf7e3d1eb4bc4897bef2cb3e

yuku commented 7 years ago

v1.8.4 was released with this patch