FLOE-407: Remove the need for the setTimeout used to determine when the language buttons are ready

Metadata

Source
FLOE-407
Type
Task
Priority
Major
Status
Closed
Resolution
Duplicate
Assignee
N/A
Reporter
Justin Obara
Created
2015-08-10T13:33:05.671-0400
Updated
2015-11-12T14:35:38.112-0500
Versions
N/A
Fixed Versions
N/A
Component
  1. First Discovery

Description

The implementation of the language panel uses setTimeout() to break the event firing of langButtonsReady out of the synchronous flow (https://github.com/fluid-project/first-discovery/blob/master/src/js/panels.js#L833-L835) to ensure the button div scrolling has completed when the event is fired. Otherwise, buttons.offset() used in listeners for this event returns position values before scrolling occurs.

Should investigate if setTimeout() can be removed.

Comments