telegramdesktop / tdesktop

Telegram Desktop messaging app
https://desktop.telegram.org/
Other
25.18k stars 5k forks source link

Telegram deletes(omits) first few words of the chat #4845

Closed Aphotic closed 6 years ago

Aphotic commented 6 years ago
### Steps to reproduce 1. Type "fast" in a chat hit Enter 2. ASAP start typing new msg 3. Telegram will miss the first few words typed in the new msg ### Expected behaviour No words should be missed(deleted by telegram) no matter how fast you type immediately after hitting enter on the previous msg. ### Actual behaviour Telegram deletes or omits first few words of the typing chat if i type ASAP after i hit enter on the previous msg. ### Configuration **Operating system:** Windows 10 Enterprise build 1803 **Version of Telegram Desktop:** 1.3.7 alpha ![image](https://user-images.githubusercontent.com/30921064/41319678-ec33a288-6eb1-11e8-931c-ab27081e0ab4.png) **Used theme**: Incognito by @IncognitoTheme #dark #grey Note: I live in Iran i Use a "VPN" maybe the new change: Optimized for censorship circumvention and can update itself automatically. is responsible?
Logs: Insert logs here (if necessary)

alexplattfuss commented 6 years ago

Same issue on Ubuntu Mate 16.04, 1.3.7a, and using the regular theme.

CarlosLopezES commented 6 years ago

Same issue on Windows 10 pro with 1.3.7, since... two days ago. Default theme. From Spain, no VPN or proxy or similar.

skacurt commented 6 years ago

The same on two different computers with different builds of Windows 10.

ghost commented 6 years ago

Experiencing the same issue on Windows 10 Pro x64 (v1803) with Telegram 1.3.7. This makes it very frustrating at times to use Telegram due to how I (and presumably most others) type.

tarcisioe commented 6 years ago

I have the same issue on Arch Linux, Gentoo and Windows 10. It has been bugging me for some time but was rare enough. Apparently got worse on 1.3.7 alpha, or I'm just typing faster :p

Jaex commented 6 years ago

I also have this issue for some time on Windows 10 with Telegram 1.3.7. But this issue was also exists in previous Telegram builds. It is too frustrating every message Telegram removing first word/characters of my messages. So I must type slow to avoid this issue.

I recorded video showcasing this issue: https://jaex.getsharex.com/2018/06/cDAqxAnBOP.mp4

In that video as soon as I sent my first message which is "123". Then I type "1234" and "12" is removed from that message. I feel like Telegram clears message textbox as soon as previous message is sent but I can't be sure. So if message is sent in 500ms and if I type word in that 500ms then that whole word could be getting deleted because of textbox clearing.

tiosolid commented 6 years ago

I guess I found the root cause of this problem. If you check closely, you will see that everything you type appears inside the box, but its soon deleted by "something". This something is the "Write a message..." text that appears as a placeholder inside the text box.

The steps to reproduce this bug is basically typing before the app "draws" the message inside the box. You can see that if you wait and try to type as soon as the message is already inside the box, no letters will be "eaten" by the app.

Im not a QT / C++ expert by any means and currently have no way to compile the client from source, but looking at the source code I found that this line is probably the main reason for this issue:

_p->drawText(placeholderRect, lang(lng_message_ph), QTextOption(st::historyComposeField.textAlign)); in the window_theme_preview.cpp file

If anyone can remove or comment this line, compile the client and check if the issue goes away I can setup everything on my side and send a pull request fixing this issue somehow (checking if the box already has text before trying to fill it with the placeholder message, I don't know..)

john-preston commented 6 years ago

@tiosolid No, this is caused by the message draft being cleared when you send a message. When app receives the draft clear event it applies that event even if the clearing was done from that exact app instance and you don't need to clear ànything really.

areebmajeed commented 6 years ago

I can confirm that I face the same issue and it is very frustrating - Windows 10.

ahmadalli commented 6 years ago

I'm facing the same issue. I think it's related to #4656 #4621 and other draft related issues. but it's gotten worse in the recent update

McoreD commented 6 years ago

I have the same issue. I hope this gets resolved asap.

ghost commented 6 years ago

Happens here also. Tried on 2 desktop PCs. Different networks (both fast). Started happening after the last update I believe.

john-preston commented 6 years ago

@Sptz Please try now. I hope this thing was fixed for me from the server side.

tarcisioe commented 6 years ago

@john-preston Although it is much better now, it still happens as it used to, less frequently, but something still clears the text input once in a while removing the first few characters of what I type.

BRTPOB commented 6 years ago

I'm seeing this behavior on two separate Windows 10 machines, and it's extremely frustrating.

ibigbug commented 6 years ago

Happened to me on both Windows and macOS, it's not critical, but annoying..

Wysie commented 6 years ago

Issue still persists with the most recent version (1.3.8). Any updates on this? Thanks!

ratijas commented 5 years ago

Issue still persists for me. Much more often of European account that on Asian. I'm living and chatting with European users. Think it's related to particular datacenter or server communication between them.

Not just all clears, but also couple of last words tend to disappear from the text as I type them in.

erfanium commented 3 years ago

This problem still exists for me Telegram desktop 2.4.7, Linux

github-actions[bot] commented 3 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.