-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Add textarea back and support IMEs #175
Conversation
@parisk please review when you get a chance, so far I've only tested this on Korean but it's probably the most complex. I'll be able to test multi-character compositions with Japanese but it will likely be small tweaks inside The code itself is very well sectioned off from the rest so you don't have to worry so much about it introducing instability when not using an IME. A section is added to the top of |
Thanks a lot for this @Tyriar! Right now I will focus on what is being needed to release 1.0.0 by the end of the week (e.g. adding a CONTRIBUTING.md file, updating the README, etc.) and I will get on top of this starting next week at most. |
@parisk thanks, probably a good idea to release v1 before pushing a change this big. If we can land this within a week it will get a bunch of testing in our Insider's build before the stable release. |
This will position any IME helper in the correct position
Move keydown event to CompositionHelper Move call in refresh to be handled with an event
Ok done and tested, at least under Chrome 51 and Ubuntu 16.04. I moved even more into the
|
(I can also help test this at paws.wmflabs.org once it lands!) |
@parisk good to go 👍 the only remaining issue is the IME helper can popup in the wrong spot on Windows due to the cursor disappearing. The fix for that likely lies in pty.js or winpty though. Input works just fine, it's just it that text being input can overlap on top of other text. |
Thanks a lot @Tyriar! Moving on with testing on OS X. |
this.textarea.setAttribute('autocapitalize', 'off'); | ||
this.textarea.setAttribute('spellcheck', 'false'); | ||
this.textarea.tabIndex = 0; | ||
this.textarea.onfocus = function() { |
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.
Could you please use this.textarea.addEventListener('focus', ...)
instead here please?
🆗 , I made my first comments on code styling and I have a few more on functionality on OS X.
|
@parisk so I took a shot at fixing the paste on right click behavior and while I got it to work by positioning the textarea under the cursor and then redirecting the event to the textarea and cancelling the original event, it removes the selection which breaks means you cannot copy using right click. Here's the super messy/hacky code I used to accomplish this:
Perhaps this should be deferred until selection is handled in a non-native way which would fix #68 and #69. I think that's how hterm behaves and it's how the VS Code editor maintains selection no matter where the focus is, seems like the right solution without compromising. There is always ctrl+shift+v and cmd+v to paste now which are the defaults on Linux/Mac. I'd prefer to get this in and accept the regression with the context menu for now as this change needs to get in for VS Code 1.4 (code freeze/testing starts on the 25th). |
🆗 let's move forward with merging this right now and I will create an issue in order to fix copy and paste with mouse until the next release (1.1.0) at 22 August 2016. |
4595a18 actually broke the IMEs as it changed focus/blur behavior on the textarea, investigating... |
Korean input using Korean (Hangul) (IBus) on Ubuntu 16.04
Japanese input using Japanese (Anthy) (IBus) on Ubuntu 16.04
Covered in this PR:
.focus
class instead of a:focus
CompositionHelper
Some of the testing that needs to be done on final version:
Fixes #124 (Terminal doesn't accept input via IME)
Remaining issues: