Revert save panel workaround

# Conflicts:
#	CHANGELOG.md
This commit is contained in:
1024jp 2023-09-04 12:59:51 +09:00
parent c7e8d1d780
commit b2b3134595
2 changed files with 8 additions and 0 deletions

View File

@ -7,6 +7,7 @@ Change Log
### Fixes
- Fix an issue that documents could not be saved with an unknown file extension.
- Fix an issue that the Share button in the Touch Bar did not work when the document was replaced with the initial empty document.

View File

@ -536,6 +536,13 @@ final class Document: NSDocument, AdditionalDocumentPreparing, EncodingHolder {
accessoryView.ensureFrameSize()
savePanel.accessoryView = accessoryView
// let save panel accept any file extension
// -> Otherwise, the file extension for `.allowedContentTypes` is automatically added
// even when the user specifies another one (macOS 14, 2023-09).
DispatchQueue.main.async { [weak savePanel] in
savePanel?.allowedContentTypes = []
}
return true
}