Skip to content
mesutcakir edited this page Oct 1, 2013 · 12 revisions

1. Not Search Problem And Fix.


  • In Textarea text :

Lorem Ipsum is simply dummy text of the printing and typesetting industry. unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not $//You write to here. only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.

//My Comment For this case, you will not suggestion box. Because the space character will be the end of the word you are looking for.

thus : `query = query.toLowerCase(); var found = _.filter(data, function(item) { return item.name.toLowerCase().indexOf(query) > -1; });

instead`

query = query.toLowerCase() .trim(); var found = _.filter(data, function(item) { return item.name.toLowerCase().indexOf(query) > -1; });

2.Long Text For Not Showed TagList


TagList Panel below the object was opened. Therefore, as a tag list @ test result is not dispensing. Fixing the position of the cursor is required.

//workaround General Code

  • (function ($, undefined) {
  •     $.fn.getCursorPosition = function() {
    
  •         var el = $(this).get(0);
    
  •         var pos = 0;
    
  •         if('selectionStart' in el) { pos = el.selectionStart;
    
  •         } else if('selection' in document) {
    
  •             el.focus();
    
  •             var Sel = document.selection.createRange();
    
  •             var SelLength = document.selection.createRange().text.length;
    
  •             Sel.moveStart('character', -el.value.length);
    
  •             pos = Sel.text.length - SelLength;
    
  •         }
    
  •         return pos;
    
  •     }
    
  • })(jQuery);
    

\n onDataRequest Code

  • $(".textntags-tag-list").css("top", textarea.getCursorPosition())
  • .css("position", "static")
  • .css("width", "300px")
  • .css("text-align","left");
Clone this wiki locally