Skip to content
This repository was archived by the owner on Jul 25, 2019. It is now read-only.

Commit 99d8a35

Browse files
Autocomplete renderer should affect cell not inner div
1 parent c0cf4a3 commit 99d8a35

7 files changed

+18
-10
lines changed

dist/jquery.handsontable.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Licensed under the MIT license.
77
* http://handsontable.com/
88
*
9-
* Date: Tue Oct 01 2013 13:17:18 GMT+0200 (Central European Daylight Time)
9+
* Date: Tue Oct 01 2013 11:54:46 GMT-0700 (PDT)
1010
*/
1111

1212
.handsontable {

dist/jquery.handsontable.full.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Licensed under the MIT license.
77
* http://handsontable.com/
88
*
9-
* Date: Tue Oct 01 2013 13:17:18 GMT+0200 (Central European Daylight Time)
9+
* Date: Tue Oct 01 2013 11:54:46 GMT-0700 (PDT)
1010
*/
1111

1212
.handsontable {

dist/jquery.handsontable.full.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Licensed under the MIT license.
77
* http://handsontable.com/
88
*
9-
* Date: Tue Oct 01 2013 13:17:18 GMT+0200 (Central European Daylight Time)
9+
* Date: Tue Oct 01 2013 11:54:46 GMT-0700 (PDT)
1010
*/
1111
/*jslint white: true, browser: true, plusplus: true, indent: 4, maxerr: 50 */
1212

@@ -3633,7 +3633,9 @@ Handsontable.AutocompleteRenderer = function (instance, TD, row, col, prop, valu
36333633
instance.rootElement.on('mouseup', '.htAutocompleteArrow', instance.acArrowListener); //this way we don't bind event listener to each arrow. We rely on propagation instead
36343634
}
36353635

3636-
Handsontable.TextRenderer(instance, TEXT, row, col, prop, value, cellProperties);
3636+
Handsontable.TextRenderer(instance, TD, row, col, prop, value, cellProperties);
3637+
var escaped = Handsontable.helper.stringify(value);
3638+
instance.view.wt.wtDom.fastInnerText(TEXT, escaped);
36373639

36383640
if (!TEXT.firstChild) { //http://jsperf.com/empty-node-if-needed
36393641
//otherwise empty fields appear borderless in demo/renderers.html (IE)

dist/jquery.handsontable.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Licensed under the MIT license.
77
* http://handsontable.com/
88
*
9-
* Date: Tue Oct 01 2013 13:17:18 GMT+0200 (Central European Daylight Time)
9+
* Date: Tue Oct 01 2013 11:54:46 GMT-0700 (PDT)
1010
*/
1111
/*jslint white: true, browser: true, plusplus: true, indent: 4, maxerr: 50 */
1212

@@ -3633,7 +3633,9 @@ Handsontable.AutocompleteRenderer = function (instance, TD, row, col, prop, valu
36333633
instance.rootElement.on('mouseup', '.htAutocompleteArrow', instance.acArrowListener); //this way we don't bind event listener to each arrow. We rely on propagation instead
36343634
}
36353635

3636-
Handsontable.TextRenderer(instance, TEXT, row, col, prop, value, cellProperties);
3636+
Handsontable.TextRenderer(instance, TD, row, col, prop, value, cellProperties);
3637+
var escaped = Handsontable.helper.stringify(value);
3638+
instance.view.wt.wtDom.fastInnerText(TEXT, escaped);
36373639

36383640
if (!TEXT.firstChild) { //http://jsperf.com/empty-node-if-needed
36393641
//otherwise empty fields appear borderless in demo/renderers.html (IE)

dist_wc/x-handsontable/jquery.handsontable.full.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Licensed under the MIT license.
77
* http://handsontable.com/
88
*
9-
* Date: Tue Oct 01 2013 13:17:18 GMT+0200 (Central European Daylight Time)
9+
* Date: Tue Oct 01 2013 11:54:46 GMT-0700 (PDT)
1010
*/
1111

1212
.handsontable {

dist_wc/x-handsontable/jquery.handsontable.full.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Licensed under the MIT license.
77
* http://handsontable.com/
88
*
9-
* Date: Tue Oct 01 2013 13:17:18 GMT+0200 (Central European Daylight Time)
9+
* Date: Tue Oct 01 2013 11:54:46 GMT-0700 (PDT)
1010
*/
1111
/*jslint white: true, browser: true, plusplus: true, indent: 4, maxerr: 50 */
1212

@@ -3633,7 +3633,9 @@ Handsontable.AutocompleteRenderer = function (instance, TD, row, col, prop, valu
36333633
instance.rootElement.on('mouseup', '.htAutocompleteArrow', instance.acArrowListener); //this way we don't bind event listener to each arrow. We rely on propagation instead
36343634
}
36353635

3636-
Handsontable.TextRenderer(instance, TEXT, row, col, prop, value, cellProperties);
3636+
Handsontable.TextRenderer(instance, TD, row, col, prop, value, cellProperties);
3637+
var escaped = Handsontable.helper.stringify(value);
3638+
instance.view.wt.wtDom.fastInnerText(TEXT, escaped);
36373639

36383640
if (!TEXT.firstChild) { //http://jsperf.com/empty-node-if-needed
36393641
//otherwise empty fields appear borderless in demo/renderers.html (IE)

src/renderers/autocompleteRenderer.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ Handsontable.AutocompleteRenderer = function (instance, TD, row, col, prop, valu
2828
instance.rootElement.on('mouseup', '.htAutocompleteArrow', instance.acArrowListener); //this way we don't bind event listener to each arrow. We rely on propagation instead
2929
}
3030

31-
Handsontable.TextRenderer(instance, TEXT, row, col, prop, value, cellProperties);
31+
Handsontable.TextRenderer(instance, TD, row, col, prop, value, cellProperties);
32+
var escaped = Handsontable.helper.stringify(value);
33+
instance.view.wt.wtDom.fastInnerText(TEXT, escaped);
3234

3335
if (!TEXT.firstChild) { //http://jsperf.com/empty-node-if-needed
3436
//otherwise empty fields appear borderless in demo/renderers.html (IE)

0 commit comments

Comments
 (0)