developit / tags-input Goto Github PK
View Code? Open in Web Editor NEW:bookmark: <input type="tags"> like magic
Home Page: http://jsfiddle.net/developit/d5w4jpxq/
License: MIT License
:bookmark: <input type="tags"> like magic
Home Page: http://jsfiddle.net/developit/d5w4jpxq/
License: MIT License
whats the minimal browser support, especially for IE?
I get the error "tags-input.js:1 Uncaught TypeError: Cannot read property 'selectionStart' of undefined"
See jsfiddle at http://jsfiddle.net/d5w4jpxq/71/ :
<input name="hashtags" type="tags" pattern="^#" placeholder="#hashtags">
Still allows data that doesn't start with a hash to be entered. The docs mention HTML5 pattern support - should we use pattern
to limit the input or should we do this via change
events?
While the placeholder
attribute is supported, a number other textual input attributes are not being copied to the internal input field.
An inexhaustive list:
spellcheck
autocorrect
autocapitalize
autosuggest
It would also be useful to support a mapping, so that we could have the source input declare an attribute like data-type
, which would dictate the type
attribute of the internal input. An example use case would be a tag-input field where each tag is a date/time/number/etc.
There is a known bug with Webkit where KeyboardEvents created by the DOM have keyCode and charCode of 0, thus preventing us from manually triggering 'change' or 'input' events with this library.
I have managed to create a workaround by triggering a 'blur' Event on the input, but ultimately triggering the KeyboardEvent with a Tab or Comma would have been a better way of interacting.
Native JavaScript, particularly JS packages, is not my forte but I'm sure a simple solution to this issue would be to modify the event listeners to work off Keys rather than KeyCodes.
Please delete.
Use gulp library build from Praline.
When press "ö" character in Turkish keyboard that pretending ENTER key.
"ö" key code is 188 and that key code had defined for COMMA in tags-input.js.
When the mouse is clicked outside the tags area, the tags highlight in red for a split second, before returning to normal.
In your code you use key codes to determine which key was pressed. But on Russian keyboard layout we have letter б
on 188th key code. For example, if I type яблоко
which means apple
in english, I get this result:
Just noticed the bower file has 3 clause BSD as the license, but the LICENSE file is MIT. Happy either way but they should probably match up, and since it's your project you get to pick.
I get the error "tags-input.js:1 Uncaught TypeError: Cannot read property 'selectionStart' of undefined"
I know this repo isn't maintained anymore but having a long placeholder seems to get cut off. Changing the width to 100% seems to solves this.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.