FLUID-4693: On current Chrome (18) layout reorderer demos will throw an exception when moving an element back to its original position

Metadata

Source
FLUID-4693
Type
Bug
Priority
Blocker
Status
Closed
Resolution
Fixed
Assignee
Antranig Basman
Reporter
Antranig Basman
Created
2012-04-10T16:09:00.921-0400
Updated
2014-03-03T12:55:33.511-0500
Versions
  1. 1.4
Fixed Versions
  1. 1.5
Component
  1. Layout Reorderer
  2. Reorderer

Description

Exception is thrown on Reorderer.js, line 800 - var oldLabel = movedMap[id].newRender.label

This seems to correspond to a previously impossible sequence of events - a service of move of an element, followed by a focusout received AFTERWARDS.

This effect can be triggered either using the mouse or the keyboard.

Environments

Chrome 18.0.1025.151 m and Windows 7

Comments

  • Antranig Basman commented 2012-04-12T05:08:13.883-0400

    Sequence: Move an element.
    --> render label from its old position into "oldRender"
    --> refresh reads this old label and generates a "moved label" for the moved item using oldRender, puts its plain label into newRender
    --> at the same time binds a focusout listener so that when the user leaves it, the label is replaced by the "newRender" and the map cleared.

    This works fine the first time round. on Chrome, the 2nd move operation triggers a focusout immediately after the "onMove" handler, but with NO intervening refresh.

    Sequence: onMove -> onRefresh - onMove2 -> focusout

    The focusout catches the handler which was rendered on the FIRST onRefresh, whereas the 2nd onMove has already cleared the map and stuck an "oldRender" in it, ready for the next onRefresh render to catch it. The onRefresh will be the next thing which happens, but perversely the somewhat fictitious focusout event triggers the old handler before we get round to overwriting it.

  • Michelle D'Souza commented 2012-05-04T07:46:28.754-0400

    I'm having trouble recreating the issue. Can you check to see that it is still a problem?

  • Antranig Basman commented 2012-05-04T15:47:46.397-0400

    You're right, on Chrome 18.0.1025.162m the issue seems to have gone away 😞 I think it would still be a good idea for the fix to go in though, since it should be harmless and generally increase the reliability of the algorithm should there be a browser regression again.

  • Michelle D'Souza commented 2012-06-29T16:42:39.786-0400

    Merged into project repo at 99a83cc49a8bbc344db44c464e39476165304429