Conversation
|
(sorry, I didn't updated minified and packed versions of the plugin - just wasn't sure which tools with what options to use) |
|
Hello, Alexis! I appreciate your help in finding and squashing this bug. I tried your solution and see that bypassing trimWords does in fact correct the problem. It took me a while to figure out why, though. It turns out that the conditional statement on line Since trimWords shaved some extra spaces off, the current cursor position is higher than the script’s current character count (it’s not counting all of those extra spaces) and so the test is false, so I like this option better, as it addresses the real culprit: the fact that the test does not take into account the trimming we’ve done. On the other hand, I can’t figure out why the original author is using this method as opposed to something simpler, such as: Seems to me like that would do the trick, without needing to count characters and check them against current cursor position to determine position within Thanks again, Alexis, for bringing this to my attention! |
|
Alfonso, thanks for the quick response! I think I understand why author didn't use a simpler approach, like For example, when the list is "Option**[>>cursor is here<<]**, Another Option, ", you should be Does this make sense? Btw, when I tried this in browser, I found that the plugin (with or without my fix) doesn't process the described |
Hi, Alfonso!
I found a little bug, when the plugin used with the following settings: {multiple: true, multipleSeparator: ', '}
Basically, it doesn't play well with redundant spaces. Steps to reproduce:
Expected result: "Option, Another Option"
Actual result: "Option, ano"