Comments (6)
Hows this for a solution...
While the search box has focus, detecting if CTRL/CMD (or ALT) is depressed and ignore it and any other key presses while it is. Unless anyone can think of a more elegant solution?
from chorus.
Would it not work to simply use something like jquery's .change() ? http://api.jquery.com/change/
Or is that what's already being used, and it's buggy? :)
from chorus.
Using keyup() I think, so change() might actually solve it! Good call.
There is some other logic wrapped around it too, ie. a timeout so it doesn't try to search for about a second after typing has stopped, but that should still work with change()
from chorus.
Although, I just noticed this after posting my comment:
or select boxes, checkboxes, and radio buttons, the event is fired immediately when the user makes a selection with the mouse, but for the other element types the event is deferred until the element loses focus.
So, i guess this is why keyup() is used instead of change. Ugh.
I guess we could do something like fire on keyup, and the function that's fired checks for a change in the value of the dom element. Already getting very complicated, though.
An alternative is to use .on('input')
, which is apparently only available on "modern browsers" (but that's already a requirement for chorus). Here's an example - http://jsfiddle.net/K682b/6/ . I tested it, and the event fires on changes, but not on pressing the modifier keys, so it seems perfect..
from chorus.
Yeah just tested it and change() is a no-go.
.on('input')
looks like a winner. And yes, there is no good reason someone should be running an old browser these days :)
I'll do some more testing but if all good, I think we have our solution!
from chorus.
Updated in 0.3.9, tested well for me, re-open if any issues
from chorus.
Related Issues (20)
- Feature Request: enable access to file system
- Feature Request: Customized background images
- Install add-on with zip file not possible HOT 5
- enable https
- Add hint to Chorus2 to Readme HOT 1
- song view never loaded HOT 1
- TAB key not working, cant go to playing
- Spotify plugin support?
- Files view not showing directories but info from tags?
- "OSD" and "Send Text" on the main Web GUI - Feature Request
- Hanging at Loading Application on old android browser
- Volume keys don't work on Azerty keyboard HOT 1
- External dependency (video.js) tries to load Google Analytics HOT 1
- chorus+database+apache2 -start kodi= work
- Make a custom filter
- Feature request - Add sources from Chorus
- Support playing DVD isos?
- Prevent to play in kodi
- uncaught exception: Error code: -32602 - message: Invalid params.
- Please update to the latest version
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chorus.