Skip to content

窗口拖拽问题 #635

@hchb1990

Description

@hchb1990

版本:miniBlink132_250809

使用以下页面代码,将windows系统开启缩放125% 或 150% 时,拖拽坐标不准确,可拖拽区域依旧是未放大前坐标区域。

尝试使用mbGetZoomFactor设置缩放因子,无效。

页面代码:


> <!DOCTYPE html>
> <html>
> <head>
>   <meta charset="UTF-8">
>   <style>
>     body {
>       margin: 0;
>       background: #222;
>       color: white;
>       font-family: sans-serif;
>     }
> 
>     .title-bar {
>       height: 40px;
>       background: #444;
>       display: flex;
>       align-items: center;
>       padding-left: 12px;
>       -webkit-app-region: drag;  /* 可拖动区域 */
>       user-select: none;
>     }
>     .btn {
>       margin-left: auto;
>       padding: 8px 12px;
>       background: #666;
>       border: none;
>       color: white;
>       cursor: pointer;
>       -webkit-app-region: no-drag; /* 使按钮不能拖动窗口 */
>     }
> 
>   </style>
> </head>
> <body>
>   <div class="title-bar">
>     拖动这里移动窗口
>  
>   </div>
>   <div style="padding:20px">
>     页面内容区域
>   </div>
> </body>
> </html>


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions