mirror of https://github.com/zulip/zulip.git
loading-spinner: Fix improper display in upload avatar setting.
In this commit we fix the improper display of loading spinner in upload avatar setting upon uploading new avatar repetitively one after the other.
This commit is contained in:
parent
aa10127cb6
commit
9387fce024
|
@ -5,6 +5,15 @@ var exports = {};
|
|||
exports.make_indicator = function (outer_container, opts) {
|
||||
opts = opts || {};
|
||||
var container = outer_container;
|
||||
|
||||
// TODO: We set white-space to 'nowrap' because under some
|
||||
// unknown circumstances (it happens on Keegan's laptop) the text
|
||||
// width calculation, above, returns a result that's a few pixels
|
||||
// too small. The container's div will be slightly too small,
|
||||
// but that's probably OK for our purposes.
|
||||
outer_container.css({display: 'block',
|
||||
'white-space': 'nowrap'});
|
||||
|
||||
container.empty();
|
||||
|
||||
if (opts.abs_positioned !== undefined && opts.abs_positioned) {
|
||||
|
@ -36,17 +45,8 @@ exports.make_indicator = function (outer_container, opts) {
|
|||
|
||||
// These width calculations are tied to the spinner width and
|
||||
// margins defined via CSS
|
||||
//
|
||||
// TODO: We set white-space to 'nowrap' because under some
|
||||
// unknown circumstances (it happens on Keegan's laptop) the text
|
||||
// width calculation, above, returns a result that's a few pixels
|
||||
// too small. The container's div will be slightly too small,
|
||||
// but that's probably OK for our purposes.
|
||||
container.css({width: 38 + text_width,
|
||||
height: 38});
|
||||
outer_container.css({display: 'block',
|
||||
'white-space': 'nowrap'});
|
||||
|
||||
|
||||
outer_container.data("destroying", false);
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue