Closed sarveshwar-gavhane closed 8 years ago
@oliverfoster come up with another way could you have a look on this.
@sarveshwar-gavhane @oliverfoster what is the status of this PR? Are we waiting for more changes.
@dancgray actually _.once(this.replaceInstructions); works for me, but let's see if @oliverfoster suggest any other solution ? otherwise we can merge this pull request.
@sarveshwar-gavhane putting something like
_.once(this.replaceInstructions);
is effectively much the same as doing
//this.replaceInstructions();
This is because _.once
is a bit like _.bind
i.e. it creates a new copy of the function you pass to it - so if you don't then assign it & call it, nothing will happen
As Matt said, I don't think this code solves the issue in the intended way. The window-resize and swap-for-hotgraphic sections need to be separated to make this issue clearer. The component is running some swap-for-hotgraphic code on a window-resize, (which is triggered a number of times, even if the window isn't resized).
Hey guys, mind checking https://github.com/adaptlearning/adapt-contrib-narrative/pull/156 - hopefully will resolve this issue. Thanks.
cheers @chris-steele will have a look later today
.accessibility-state span gets removed and Re-added, from pre render resizeControl is calling twice replaceInstructions that's why tabindex value is not updated it is Re-added, due to this The focus returns to the top of the page, then to the instruction text on the narrative component, and then finally on to the close button within the hotgraphic popup.