From 3669eea4bde3518ce080048e9f53d2dd111fd8be Mon Sep 17 00:00:00 2001 From: Jon Reid Date: Wed, 21 Mar 2012 11:37:48 -0700 Subject: Timeline: Bug fix: style collapsers not staying in synch. Also, removed console.log calls in hintable component. --- js/components/hintable.reel/hintable.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'js/components/hintable.reel') diff --git a/js/components/hintable.reel/hintable.js b/js/components/hintable.reel/hintable.js index 5ed46b3c..cbfe2d9b 100644 --- a/js/components/hintable.reel/hintable.js +++ b/js/components/hintable.reel/hintable.js @@ -90,10 +90,10 @@ exports.Hintable = Montage.create(Editable, { hintNext : { value : function(e) { if(e) { e.preventDefault(); } - console.log('next1'); + //console.log('next1'); if(this._matchIndex < this.matches.length - 1) { - console.log('next'); + //console.log('next'); ++this._matchIndex; this.hint = this._getHintDifference(); } @@ -102,9 +102,9 @@ exports.Hintable = Montage.create(Editable, { hintPrev : { value : function(e) { if(e) { e.preventDefault(); } - console.log('prev1'); + //console.log('prev1'); if(this._matchIndex !== 0) { - console.log('prev'); + //console.log('prev'); --this._matchIndex; this.hint = this._getHintDifference(); } @@ -135,7 +135,7 @@ exports.Hintable = Montage.create(Editable, { /// revert to old value this.value = (this._preEditValue); this._sendEvent('revert'); - console.log('reverting'); + //console.log('reverting'); } } @@ -180,7 +180,7 @@ exports.Hintable = Montage.create(Editable, { var val = this.value, matches, hint; - console.log('val = "' + val + '"'); + //console.log('val = "' + val + '"'); //// Handle auto-suggest if configured if(this.hints instanceof Array) { -- cgit v1.2.3 From 969137ba4520103348a496ac9b99063dc4ec8f96 Mon Sep 17 00:00:00 2001 From: Jon Reid Date: Thu, 5 Apr 2012 10:38:57 -0700 Subject: Timeline: Bug fix for IKNINJA-1086, "CSS Style Suggestion stops working" --- js/components/hintable.reel/hintable.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'js/components/hintable.reel') diff --git a/js/components/hintable.reel/hintable.js b/js/components/hintable.reel/hintable.js index cbfe2d9b..6e3b2aaf 100644 --- a/js/components/hintable.reel/hintable.js +++ b/js/components/hintable.reel/hintable.js @@ -157,6 +157,14 @@ exports.Hintable = Montage.create(Editable, { this._super(arguments); + /// Remove the phantom "
" element that is generated when + /// content editable element is empty + this._children(this._element, function(item) { + return item.nodeName === 'BR'; + }).forEach(function(item) { + this._element.removeChild(item); + }, this); + if(k === 39) { selection = window.getSelection(); text = selection.baseNode.textContent; -- cgit v1.2.3