Append color picker to #subscriptions_table instead of document.body.

Adding the container attribute to the color picker options parameter
modifies the behavior of the spectrum function to allow the color
picker to be attached to the #subscriptions_table element rather than
the default document.body element.

This allows for the color picker to scroll with the subscriptions page,
fixing the bug where the color picker would not scroll up/down the page.

Fixes #1293.
This commit is contained in:
Brock Whittaker 2016-08-09 03:08:12 -07:00 committed by Tim Abbott
parent eda1cdd0c5
commit e34b9be950
1 changed files with 1 additions and 1 deletions

View File

@ -84,7 +84,7 @@ var subscriptions_table_colorpicker_options = {
exports.set_colorpicker_color = function (colorpicker, color) { exports.set_colorpicker_color = function (colorpicker, color) {
colorpicker.spectrum(_.extend(subscriptions_table_colorpicker_options, colorpicker.spectrum(_.extend(subscriptions_table_colorpicker_options,
{color: color})); {color: color, container: "#subscriptions_table"}));
}; };
exports.update_stream_color = function (sub, stream_name, color, opts) { exports.update_stream_color = function (sub, stream_name, color, opts) {