Skip to content

Conversation

@karimMourra
Copy link

This PR will...

Reverse a copy of the axis array as a workaround for a bug introduced in Safari 12 (https://bugs.webkit.org/show_bug.cgi?id=188794)

Why is this Pull Request needed?

Safari 12 introduced a bug where calling reverse on an array will cache the reverse value, causing captions to jump up and down.
To reproduce the bug run the following:

for (var i = 0; i <= 10; i ++) {
	var array1 = ['one', 'two'];
	console.log('array1: ', array1);
	var reversed = array1.reverse(); 
}

notice that even though the array is being instantiated, the value is reversed even before reverse is called.

The following screenshot shows the bug in action:
wtf

Safari 12 bug workaround
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant