   func setCursorRange(_ range: NSRange) {
     if range.location != NSNotFound {
       webView!.evaluateJavaScript("setCursorRange(\(range.location),\(range.length));", completionHandler: nil)
+      self.currentCursorRange = range
     }
   }
 

    log.info("Loaded keyboard.")

    resizeKeyboard()
    setDeviceType(UIDevice.current.userInterfaceIdiom)
    
    let shouldReloadKeyboard = Manager.shared.shouldReloadKeyboard

  private var bannerImgPath: String = ""

  var isLoading: Bool = false

  private var currentText: String = ""
  private var currentCursorRange: NSRange? = nil

  init(storage: Storage) {
    self.storage = storage
