Skip to content
This repository was archived by the owner on Jun 23, 2020. It is now read-only.

Commit 5175699

Browse files
pavel-cliqzchrmod
authored andcommitted
fixed url bar autocompletion text frame issue (#416)
1 parent 81518a3 commit 5175699

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Client/Frontend/Widgets/AutocompleteTextField.swift

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,11 +253,14 @@ class AutocompleteTextField: UITextField, UITextFieldDelegate {
253253
let enteredTextSize = self.attributedText?.boundingRect(with: self.frame.size, options: NSStringDrawingOptions.usesLineFragmentOrigin, context: nil)
254254
frame.origin.x = (enteredTextSize?.width.rounded() ?? 0)
255255
frame.size.width = self.frame.size.width - frame.origin.x
256-
#if PAID
257-
frame.size.height = self.frame.size.height + 1
258-
#else
259256
frame.size.height = self.frame.size.height - 1
257+
258+
#if PAID
259+
if self.text?.count ?? 0 == 0 {
260+
frame.origin.y = 1
261+
}
260262
#endif
263+
261264
label.frame = frame
262265
return label
263266
}

0 commit comments

Comments
 (0)