Browse Source

【fix】【BOTA】注释回复后,再次点击编辑,Mac会全选文字,Windows是将光标位于最后

tangchao 5 months ago
parent
commit
77d753d24c

+ 4 - 0
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/Annotation/View/KMNoteFooterCellView.swift

@@ -100,6 +100,10 @@ class KMNoteFooterCellView: NSTableCellView, NibLoadable {
                 self?.inputBox.borderColor = NSColor.km_init(hex: "#1770F4")
                 
                 self?.inputRespButton_.isHidden = true
+                
+                if let range = self?.inputTextF.currentEditor()?.selectedRange {
+                    self?.inputTextF.currentEditor()?.selectedRange = NSMakeRange(range.length, 0)
+                }
             } else {
                 if KMAppearance.isDarkMode() {
                     self?.inputBox.borderColor = NSColor(hex: "#56585A")

+ 2 - 2
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/Annotation/View/KMNoteTableViewCell.swift

@@ -284,8 +284,8 @@ extension KMNoteTableViewCell {
 
         self.noteContentBox.isHidden = true
         self.noteImageView.isHidden = true
-//        self.foldButton.isHidden = true
-        self.foldButton.isHidden = false
+        self.foldButton.isHidden = true
+//        self.foldButton.isHidden = false
         self.annotationContentLabel.isHidden = false
 
         self.noteContentLabel.stringValue = noteString