diff --git a/app/assets/javascripts/app/lib/base/jquery.textmodule.js b/app/assets/javascripts/app/lib/base/jquery.textmodule.js index cc955504e..f550cab41 100644 --- a/app/assets/javascripts/app/lib/base/jquery.textmodule.js +++ b/app/assets/javascripts/app/lib/base/jquery.textmodule.js @@ -191,6 +191,7 @@ // set height of widget Plugin.prototype.movePosition = function() { + if (!this._position) return var height = this.$element.height() + 20 var widgetHeight = this.$widget.find('ul').height() //+ 60 // + height var top = -( widgetHeight + height ) + this._position.top diff --git a/app/assets/javascripts/app/lib/base/rangy-textrange.js b/app/assets/javascripts/app/lib/base/rangy-textrange.js new file mode 100755 index 000000000..58d7528b5 --- /dev/null +++ b/app/assets/javascripts/app/lib/base/rangy-textrange.js @@ -0,0 +1,1925 @@ +/** + * Text range module for Rangy. + * Text-based manipulation and searching of ranges and selections. + * + * Features + * + * - Ability to move range boundaries by character or word offsets + * - Customizable word tokenizer + * - Ignores text nodes inside