Skip to content
This repository has been archived by the owner on Sep 12, 2024. It is now read-only.

Commit

Permalink
Remove autofocus (not stable)
Browse files Browse the repository at this point in the history
  • Loading branch information
marshallino16 committed Mar 22, 2021
1 parent 2d84e6c commit 28e05c4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions Snip/Components/Sidebar/SnipItemView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ struct SnipItemView<Content: View>: View {

@State private var isExpanded: Bool = false
@State private var isEditingName = false
@State var hasTriggered: Bool = false
//@State var hasTriggered: Bool = false

let content: () -> Content?

Expand Down Expand Up @@ -73,13 +73,13 @@ struct SnipItemView<Content: View>: View {
.frame(maxWidth: .infinity, alignment: .leading)
.padding(EdgeInsets(top: 4, leading: 0, bottom: 4, trailing: 0))
.background(themePrimaryColor)
.introspectTextField { textField in
/*.introspectTextField { textField in
if self.hasTriggered == false {
textField.becomeFirstResponder()
self.hasTriggered = true
}
}
.onAppear(perform: {self.hasTriggered = false})
.onAppear(perform: {self.hasTriggered = false})*/
.onHover { inside in
if inside {
NSCursor.iBeam.push()
Expand Down Expand Up @@ -180,13 +180,13 @@ struct SnipItemView<Content: View>: View {
.frame(maxWidth: .infinity, alignment: .leading)
.padding(.leading, 4)
.background(themePrimaryColor)
.introspectTextField { textField in
/*.introspectTextField { textField in
if self.hasTriggered == false {
textField.becomeFirstResponder()
self.hasTriggered = true
}
}
.onAppear(perform: {self.hasTriggered = false})
.onAppear(perform: {self.hasTriggered = false})*/
.onHover { inside in
if inside {
NSCursor.iBeam.push()
Expand Down
2 changes: 1 addition & 1 deletion Snip/Components/Welcome/WelcomeView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ struct WelcomeView: View {
.foregroundColor(themeTextColor)
.padding(EdgeInsets(top: 16, leading: 0, bottom: 16, trailing: 0))
HStack {
Text("- Fix sidebar icon not visible\n- Auto close tags and brackets\n- better search and replace dialog\n- Added indent size setting\n- Added default mode setting\n- New icon\n- Added autofocus when renaming a snippet\n- Disabled window tabbing")
Text("- Fix sidebar icon not visible\n- Auto close tags and brackets\n- better search and replace dialog\n- Added indent size setting\n- Added default mode setting\n- New icon\n- Disabled window tabbing")
.font(Font.custom("CourierNewPSMT", size: 12))
.foregroundColor(themeTextColor)
Spacer()
Expand Down

0 comments on commit 28e05c4

Please sign in to comment.