Code Monkey home page Code Monkey logo

autocomplete's People

Contributors

hkaju avatar magnushiie avatar msokk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

autocomplete's Issues

Destroy() does not properly remove bindings

Found out with testing that .destory() does not properly remove binding. Example Code:
`window.autocomplete = new TeleportAutocomplete({
el: '#search-box',
maxItems: 5,
geoLocate: false
});

$('#search-by-keyword span').on('click', function() {
window.autocomplete.destroy();
}`
After clicking the span identified, you can type into the box, but on pressing 'enter' the keydown bind for TeleportAutocomplete will fire. This can be corrected by commenting out lines 58-59:

// Shorthands
//HTMLElement.prototype.on = HTMLElement.prototype.addEventListener;
//HTMLElement.prototype.off = HTMLElement.prototype.removeEventListener;

and converting all .on/.off calls to jQuery.on/.off.

This may only be a problem when autocomplete is used in combination with jQuery. I have not tested this without.

full-name with diacritics

If name contains diacritics, a filtered name (without diacritics) is appended to full_name. Ex:

 full_name: "Münchenstein, Basel-Landschaft, Switzerland (Munchenstein)"
 name: "Münchenstein"

But it's not always the case. Ex:

full_name: "Saint-Dié-des-Vosges, Grand Est, France"
name: "Saint-Dié-des-Vosges"

How to prevent this addition ? Or how to make it systematic when there are accents in the name ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.