Repository navigation
Description
Preflight Checklist
- I have read the Contributing Guidelines for this project.
- I agree to follow the Code of Conduct that this project adheres to.
- I have searched the issue tracker for a bug report that matches the one I want to file, without success.
Electron Version
41.2.1
What operating system(s) are you using?
Windows
Operating System Version
版本 Windows 10 专业版 版本号 22H2 安装日期 2023/11/17 OS 内部版本 19045.6466
What arch are you using?
x64
Last Known Working Electron version
41.2.0
Does the issue also appear in Chromium / Google Chrome?
I don't know how to test
Expected Behavior
Starting with version 41.2.1, the left, right, and bottom borders of the window will have a dark gray border line, while the top border will not have a dark gray border line. This issue did not exist in previous versions.
上面这种图是41.2.0版本,windows 10上面正常显示,边框没有黑线。
Actual Behavior
This image shows the black lines appearing on Windows 10 after upgrading to version 41.2.1 or later. There are no black lines on the top border; only the left, right, and bottom borders have black lines. The effect is not visible on Windows 11; the black lines are only visible on Windows 10.
Operating system information:
Processor: 11th Gen Intel(R) Core(TM) i5-1155G7 @ 2.50GHz; 2.50 GHz
RAM: 24.0 GB (23.8 GB available);
Storage: 954 GB SSD; UMIS RPITJ1TBVME2HWD;
Graphics: Intel(R) Iris(R) Xe Graphics (128 MB)
System type: 64-bit operating system, x64-based processor
Version: Windows 10 Professional
Version Number: 22H2
Installation Date: 2023/11/17
OS Build Number: 19045.6466
Testcase Gist URL
Additional Information
访问github gitst无法打开,单独创建了一个示例repo, 直接运行npm run dev
只有windows 10上面有这个黑线问题,windows 11上面看不出来黑线。
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fields👍 Does Not Block Stable
Activity
yuzw1007 commentedon May 7, 2026
我试了下最新的electron 42.0.0版本也是有相同问题(windows 10上面),
nikwen commentedon May 7, 2026
Google Translate version.
Thanks for reporting! This looks like a Windows 10 version of #51456. CC @mitchchn.
Could you please post your repro as a gist made with Fiddle? For security reasons, maintainers won't run external repositories with third-party dependencies.
Range: v41.2.0...v41.2.1
electron-issue-triage commentedon May 7, 2026
Hello @yuzw1007. Thanks for reporting this and helping to make Electron better!
Would it be possible for you to make a standalone testcase with only the code necessary to reproduce the issue? For example, Electron Fiddle is a great tool for making small test cases and makes it easy to publish your test case to a gist that Electron maintainers can use.
Stand-alone test cases make fixing issues go more smoothly: it ensure everyone's looking at the same issue, it removes all unnecessary variables from the equation, and it can also provide the basis for automated regression tests.
Now adding the blocked/need-reproNeeds a test case to reproduce the bug
label for this reason. After you make a test case, please link to it in a followup comment. This issue will be closed in 10 days if the above is not addressed.
yuzw1007 commentedon May 7, 2026
gits.github.com 这个地址我这儿访问不了。
nikwen commentedon May 7, 2026
Understood! In that case, can you create a reproduction in Fiddle, save it via
File > Save, and upload the resulting folder as a GitHub repository? Then we'll have a simple reproduction without third-party dependencies.nikwen commentedon May 7, 2026
Just posting some screenshots from a Windows 10 machine here because @mitchchn requested them.
Frameless Electron window (default Fiddle with
frame: false) next to a frameless non-Electron window:Settings window focused:
Settings window not focused:
Electron doesn't look like either of them.
Default fiddle with frame:
That one looks native.
Chrome 146:
5 remaining items
mitchchn commentedon May 15, 2026
Thanks @yuzw1007. You are correct about the line of code which causes the top border not to appear on Windows 10.
However:
So it is correct for the top and side insets to be different. Windows 11 handles this situation appropriately by drawing a border regardless of insets. Windows 10 does not -- it requires insets to draw the side borders, and uses the native caption to draw the top border.
Chrome specifically works around this problem by manually drawing a 1 px border at the top of the window in
BrowserFrameViewWin::PaintTitlebar: https://chromium.googlesource.com/chromium/src/+/refs/heads/main/chrome/browser/ui/views/frame/browser_frame_view_win.cc#728.This is something Electron could also do (or in a simpler way using DWM, per the comment in that code). I'd be happy to look at a PR if I do not get around to it myself.
However it is a minor graphical problem which existed before (although with a slightly different outcome) and which only affects Windows 10. The trade-off is improved resize behavior in all versions of Windows.
electron-issue-triage commentedon Aug 14, 2026
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!
electron-issue-triage commentedon Sep 14, 2026
This issue has been closed due to inactivity, and will not be monitored. If this is a bug and you can reproduce this issue on a supported version of Electron please open a new issue and include instructions for reproducing the issue.
CN-Tower commentedon Nov 13, 2026
Electron白边的bug没人管吗,我用v45.3.1还是能够复现?没修复的话新版本一直不能用哦,我提的issue在这,#51891
Electron fiddle的github gist也有:https://gist.github.com/CN-Tower/ca384e1a1545d2bbb9693589de76851a
mlaurencin commentedon Nov 16, 2026
Reopening as linked duplicate issue should have been noted as activity and resulted in the stale timer being cleared