Skip to content

Commit

Permalink
Fix editor visible height (#810)
Browse files Browse the repository at this point in the history
  • Loading branch information
cyanzhong authored Jan 10, 2025
1 parent c919726 commit 990d1f1
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,9 @@ extension EditorViewController {

webView.update(animated).frame = CGRect(
x: 0,
y: offset,
y: offset + findPanelHeight,
width: view.bounds.width,
height: height
height: height - findPanelHeight
)
}

Expand Down Expand Up @@ -322,7 +322,11 @@ private extension EditorViewController {
}

var findPanelHeight: Double {
findPanel.isHidden ? 0 : findPanel.frame.height
switch findPanel.mode {
case .hidden: return 0
case .find: return findPanel.frame.height
case .replace: return findPanel.frame.height + replacePanel.frame.height
}
}

@objc func popoverDidShow(_ notification: Notification) {
Expand Down

0 comments on commit 990d1f1

Please sign in to comment.