             components?.password = nil
             fullUrl = components?.url?.absoluteString
             truncatedURL = components?.host
-            urlText.text = isEditing ? fullUrl : truncatedURL
+            urlText.text = displayFullUrl ? fullUrl : truncatedURL
             truncatedUrlText.text = truncatedURL
         }
     }


    override fileprivate func rightViewRect(forBounds bounds: CGRect) -> CGRect {
        return super.rightViewRect(forBounds: bounds).offsetBy(dx: -UIConstants.layout.urlBarWidthInset, dy: 0)
    }
}



extension URLBar: AutocompleteTextFieldDelegate {
    func autocompleteTextFieldShouldBeginEditing(_ autocompleteTextField: AutocompleteTextField) -> Bool {

        setTextToURL(displayFullUrl: true)
        
        if !isEditing && inBrowsingMode {
            present()
