Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Moved the calling of sendUrlBarInputEvent to notifyTextChanged so…

… that it syncs with calling `didEnterText` in the URLBar
  • Loading branch information
mahmoud-adam85 authored and Tim Palade committed Apr 18, 2018
1 parent 191610b commit c779e8b48577d89b4086b970016349e3e28a12fa
Showing with 4 additions and 3 deletions.
  1. +4 −3 Client/Frontend/Widgets/AutocompleteTextField.swift
@@ -78,6 +78,10 @@ class AutocompleteTextField: UITextField, UITextFieldDelegate {
notifyTextChanged = debounce(0.1, action: {
if self.isEditing {
self.autocompleteDelegate?.autocompleteTextField(self, didEnterText: self.normalizeString(self.text ?? ""))

//Cliqz: Cliqz Search
Engine.sharedInstance.sendUrlBarInputEvent(newString: self.text, lastString: self.lastText)
self.lastText = self.text
}
})
}
@@ -255,9 +259,6 @@ class AutocompleteTextField: UITextField, UITextFieldDelegate {
//Cliqz: Always notify text change
notifyTextChanged?()
}
//Cliqz: Cliqz Search
Engine.sharedInstance.sendUrlBarInputEvent(newString: textField.text, lastString: lastText)
lastText = textField.text
}

// Reset the cursor to the end of the text field.

0 comments on commit c779e8b

Please sign in to comment.