Determine whether an input method has uncommitted ("marked") text when p...#52
Determine whether an input method has uncommitted ("marked") text when p...#52JimLiu wants to merge 1 commit intoovertake:masterfrom
Conversation
…n press enter If user is typing with an non-english input method, do not send message out when he press enter. 
|
Cool, definitely fixed my problem :) |
|
Cool! It helps a lot. |
Yes, this is the full commit! At first, let reproduce this bug:
So I added a line Reference: Cocoa Text Architecture Guide - Text Editing - Creating a Custom Text View - Managing Marked Text |
|
thanks, i got it |
|
@overtake It seemed that this commit had not been merged? This bug has still not been fixed in the new version. |
|
@JimLiu Hi, after applying your patch, we are having problems sending messages - we need to enter double times to send a message. Korean users are complaining about it(https://itunes.apple.com/kr/app/telegram/id747648890?mt=12). See also #62. |
|
@nicekei I'll take a look later. If the issue can be reproduced, it can be fixed. |
|
@JimLiu eg. Type "gkgk" with the Korean input method which result in "하하", then press enter. The message would not be sent. The thing is that, the marked text itself is not sufficient to check if the enter key be regarded as the send key OR the IME composition related key. In Korean case, although you can see the underlined/marked text in the text view, there's no other candidates and its just simple text which is ready to be sent. I think the current Telegram message sending way causes this problem. |
|
@JimLiu Any progresses? Its been a while since I last reported this one. Korean people loves telegram - but I feel sorry about the situation that Mac users are continuously complaining about the issue I mentioned. How about rollback your commit? At least you can add an option for this mod. eg. "Do not send the marked text". Your committed codes result in the disaster - it work in your cases. but its disaster in other cases. Simply speaking, that didn't work. I don't know why @overtake isn''t commenting anything about it. Is telegram for Mac dead? |
|
@nicekei for others people this code is bad, because need press enter two times. i don't understand this issue ;( |
|
@overtake I'm glad you are back. Entering two times is annoying, seriously. This code snippet was incomplete/wrong, but got into the actual release. What should we do? |
|
@iceboundrock Sure its an open source project. What @JimLiu made is a PR which fixes an issue in some cases but produces an annoying error in other cases. Note that we are sharing the same code base - telegram is an international messenger NOT a Chinese only messenger . If there were some tests to check, this PR wouldn't pass it I think. I'm pointing out that this PR was not accurate. Imagine that if I made a PR which fixes issues in Korean, but produces some bugs in others. In that case, that PR should not get into the master branch. But this was not the case here. The breaking PR got into the master branch. Maybe I could check it all myself and made a fix. But we can talk before code :) @JimLiu made the PR and I found this bug reported it to him, and he said he will look into it. Maybe I was waiting for some response. Anyway I'd like to fix this problem too. If he couldn't fix the bug, I will dig into this problem and make some fixes to this issue :D |

...ress enter
If user is typing with an non-english input method, do not send message out when he press enter.
