Skip to content

Commit 9921194

Browse files
author
SimonSteinberger
committed
Optimized code.
1 parent 7a70f1a commit 9921194

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

auto-complete.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,7 @@ var autoComplete = (function(){
7373
if (!resize) {
7474
that.sc.style.display = 'block';
7575
if (!that.sc.maxHeight) { that.sc.maxHeight = parseInt((window.getComputedStyle ? getComputedStyle(that.sc, null) : that.sc.currentStyle).maxHeight); }
76-
if (!that.sc.suggestionHeight) {
77-
var rect2 = that.sc.querySelector('.autocomplete-suggestion').getBoundingClientRect();
78-
that.sc.suggestionHeight = rect2.bottom - rect2.top;
79-
}
76+
if (!that.sc.suggestionHeight) that.sc.suggestionHeight = that.sc.querySelector('.autocomplete-suggestion').offsetHeight;
8077
if (that.sc.suggestionHeight)
8178
if (!next) that.sc.scrollTop = 0;
8279
else {

auto-complete.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)