anchor.diff:      // On paste, remove enough characters to make room for the text that will be pasted
       _pasteSub = _element.onPaste.listen(_changeEventFunction((Event e) {
         // remove enough characters to make room for pasted text
  -      _element.setRangeText("", _element.selectionStart, _element.selectionStart + e.clipboardData.getData("Text").length, "start");
  +      _element.setRangeText("", start: _element.selectionStart, end: _element.selectionStart + e.clipboardData.getData("Text").length, selectionMode: "start");
       }));
  -    
  +
       // On cut, add in enough spaces to compensate for the text that will be removed
       _cutSub = _element.onCut.listen(_changeEventFunction((Event e) {
         // create a string of spaces the same length as the text that will be cut
  
positive.code:       ..style.opacity = "0";
      // add element to body
      document.body.children.add(_widthEl);
          
      // On focus, update the width of the element to fill available space
      _focusSub = _element.onFocus.listen(_changeEventFunction((e) {
        // pad contents
  
negative.code:         _element.selectionEnd = _element.selectionStart = _element.maxLength - 1;
        }
        // delete the character the new one will replace and clobber selection if it exists
        _element.setRangeText("", start: _element.selectionStart, end: _element.selectionStart+1, selectionMode: "start");
      }));
    }
  
    // Set the input mode
    void setInputMode(OverwriteMode mode) {
      // don't do anything if we're already at that mode
  