-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds support for copy/paste #25
Conversation
In terms of testing, unit tests pass & I'll give this a whirl. 'coupla lil questions for curiosity's sakes: What happened that we need to add the left and right arrows to the non printable keys? aaand, What was the trick with all that version-number craziness? (thanks ahead of time for the lesson :)) |
each time when you were navigating throughout the text (going left or right), a request was sent back to the server to fetch possible suggestions, I assumed that this wasn't an expected behaviour.
just to have a green build on Travis 😆 |
The complied JavaScript worked like a charm so I'm all sorts of 👍 @pdyraga for GK? |
Noooooow I get it.. 'just hit me that the way to check the Travis build is to just keep committing until its green 😆 |
dist/elemica-suggest.js
Outdated
@@ -6,18 +6,22 @@ elemicaSuggest 0.9.2-SNAPSHOT | |||
*/ | |||
|
|||
(function() { | |||
var indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to define indexOf
here? Starting from IE9 it should be available in Array
: https://www.w3schools.com/jsref/jsref_indexof_array.asp
Is it for IE8 compatibility? I think we can drop a support for this version in the elemica-suggest
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No idea, it's what npm run-script dist
produced. I didn't change any option related to IEs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting... Let's trust coffee's compiler, we have no better option 😉
dist/elemica-suggest.js
Outdated
@@ -27,6 +31,7 @@ elemicaSuggest 0.9.2-SNAPSHOT | |||
ALT = 18; | |||
OS_LEFT = 91; | |||
OS_RIGHT = 92; | |||
NON_PRINTALBE_KEYS = [SHIFT, CTRL, ALT, OS_LEFT, OS_RIGHT, TAB, LEFT_ARROW, RIGHT_ARROW]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PRINTALBE
-> PRINTABLE
? 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can blame natives, I have just added LEFT_ARROW
and RIGHT_ARROW
;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
c51740f
to
b8f55de
Compare
Re-tested this new dist with mercury and everything looks good. |
👍 |
User can paste a name of a suggestion she's looking for