File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -228,9 +228,9 @@ export class MainWindow {
228
228
if ( windowState === "Maximized" && _fullScreen . getEnabled ( ) === false ) {
229
229
baseWindow . normal ( ) ;
230
230
} else {
231
- setTimeout ( ( ) => {
231
+ setTimeout ( ( ) => { // 直接全螢幕會與視窗拖曳衝突,所以加入延遲
232
232
baseWindow . maximized ( ) ;
233
- } , 50 ) ;
233
+ } , 150 ) ;
234
234
}
235
235
} ) ;
236
236
Lib . addEventDblclick ( _fileShow . iframes . welcomeview . dom , async ( ) => { // 歡迎頁面
@@ -240,12 +240,12 @@ export class MainWindow {
240
240
} else {
241
241
setTimeout ( ( ) => {
242
242
baseWindow . maximized ( ) ;
243
- } , 50 ) ;
243
+ } , 150 ) ;
244
244
}
245
245
} ) ;
246
246
247
247
// 讓工具列允許拖曳視窗
248
- _domToolbar . addEventListener ( "mousedown" , async ( e ) => {
248
+ Lib . addDragThresholdListener ( _domToolbar , 1 , async ( e ) => { // 移動一定距離後觸發
249
249
if ( _fullScreen . getEnabled ( ) === true ) { return ; }
250
250
const dom = e . target as HTMLDivElement ;
251
251
if ( dom ) {
Original file line number Diff line number Diff line change @@ -89,8 +89,7 @@ class SettingWindow {
89
89
90
90
// 拖曳視窗
91
91
const domLeftBox = getDom ( "#window-left .pagetab" ) as HTMLElement ;
92
- domLeftBox . addEventListener ( "mousedown" , async ( e ) => {
93
-
92
+ Lib . addDragThresholdListener ( domLeftBox , 1 , async ( e ) => { // 移動一定距離後觸發
94
93
// 如果有滾動條,就禁止拖曳(避免無法點擊滾動條)
95
94
if ( Lib . isScrollbarVisible ( domLeftBox ) ) { return ; }
96
95
You can’t perform that action at this time.
0 commit comments