您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
When switching entry, a function that focus and select the text will also scroll the translation textbox under the page header and cause issues. This script fixes this problem while keep the "focus and select" part of that function.
当前为
When switching entry, a function that focus and select the text will also scroll the translation textbox under the page header and cause issues.
This script fixes this problem while keep the "focus and select" part of that function.
This one bug hung me for a long time, and I spent hours to trace down its callback hell to reach the real troublemaker:
A func call to $.fn.scrollIntoView()
, hidden inside $.fn.focusAndSelect()
, which is hide
after $.fn.focusAndSelectAll()
, which is called by LangKey.showSuggestionForm()
, which
will be called onclick when switching entry.
LangKey.showSuggestionForm()
also does the scroll, animated, but is before that final
bad scroll in $.fn.scrollIntoView()
and thus useless.
I really think the JavaScript part in Telegram Translations is overengineered.
Refactor it, or maybe do some CSS upgrade like dark theme or densed view... Will be much more helpful than adding all those callbacks and scrolls with hard-to-diagnose issues.
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址