Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Version 1.2.0
https://github.com/culefa/JavaScript-autoComplete/tree/1.2.0
The autocomplete is no longer attached to body. It is attached in a pivot element before the input field.
By using CSS, it can fully automatically locate with the dynamic position of the input field.
(Sizing is not CSS automatically, but it can be updated via JS)
Issues:
Override PRs (those PRs are no longer valid as implementation changes with issue fixing):
New DOM Structure
Compatible with original layout
Dynamic Positioning Layout
Link:
Demo
https://raw.githack.com/culefa/JavaScript-autoComplete/1.2.0/demo.html
JS
https://cdn.jsdelivr.net/gh/culefa/[email protected]/auto-complete.js
https://cdn.jsdelivr.net/gh/culefa/[email protected]/auto-complete.min.js
CSS
https://cdn.jsdelivr.net/gh/culefa/[email protected]/auto-complete.css
https://cdn.jsdelivr.net/gh/culefa/[email protected]/auto-complete.min.css
Browser Requirements - Earlier 2015+
Breaking Changes (1.2.0)
Dynamic Positioning (CSS and layout revised)
Added
onRenderwhich is exposed to publicAdded
clickToShowwhich is to determine if the dropdown should be shown for user's clicking on input field.Added
closeOnTapwhich is to determine if the dropdown should be closed for user's tapping on an autocomplete item.Can move the dropdown with "position=top", see demo.
Other Changes (1.2.0)
Changed
mousedowntopointerdownwith left click detectionRedesign event mechanism for blur, focus, and mouse (pointer) events
Added
destroyAutoComplete(element method) for removing references for the specific input field.Added
isContentNotEmpty(element method) for checking the input is empty or not.Added
inputevent handler to detect the actual change of input value instead of accepting functional keys like ctrl / shift / alt as committing the temporary change tolast_val.Use
.closestinlive()for shorter coding.Version 1.1.0
https://github.com/culefa/JavaScript-autoComplete/tree/1.1.0
PRs included:
Issues:
Also fixed some issues related to demo.html, README, etc.
Fix for Significant Bugs:
valinside setTimeout might have already changed. Refresh thevalvalue.displaywas not set initially.No change of any existing usages.
Link:
Demo
https://raw.githack.com/culefa/JavaScript-autoComplete/1.1.0/demo.html
JS
https://cdn.jsdelivr.net/gh/culefa/[email protected]/auto-complete.js
https://cdn.jsdelivr.net/gh/culefa/[email protected]/auto-complete.min.js
CSS
https://cdn.jsdelivr.net/gh/culefa/[email protected]/auto-complete.css
https://cdn.jsdelivr.net/gh/culefa/[email protected]/auto-complete.min.css
Browser Requirements - Late 2014+
Breaking Changes (1.1.0)
Dropped IE Support
renderItemcan now accept element in addition to html codeadded
renderItemswhich is exposed to publicOther major changes (1.1.0)
replaced
mouseovertomouseenterfor better performancemodifying
classListinstead ofclassNameAdded
triggerSC(element method) for update result manually