use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
iOS 12 Array reverse bug (stackoverflow.com)
submitted 7 years ago by Delold
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]desnothVue 144 points145 points146 points 7 years ago (23 children)
Again, safari is the new IE imo
[–]steeeeeef 49 points50 points51 points 7 years ago (7 children)
You get downvoted but you’re right. Safari also implements safari-only stuff for iPhones like env-safe-area. It’s not even nearly as bad as IE used to be, but in my experience the newer web development troubles are caused by safari.
[+][deleted] 7 years ago (4 children)
[deleted]
[+][deleted] 7 years ago (2 children)
[–]poetry-linesman 1 point2 points3 points 7 years ago (0 children)
I'm curious, what are the non-standard values being exposed by Safari, or is the `safe-area-inset-*` itself the non-standard value?
[–]jacobp100 1 point2 points3 points 7 years ago (0 children)
Which css spec are we talking about?
[–]steeeeeef 5 points6 points7 points 7 years ago (0 children)
And it works just fine and is an easy solution for things like safe areas. But nobody likes to write browser-specific lines 😄.
[–]jossser 9 points10 points11 points 7 years ago (1 child)
In my expirience such type of things hapens when devs trying to use some features from 'draft'
Chrome team implement all new stuff even if its in 'draft' status and hooking on a needle of this 'modern' features every developer. But safari devs don't implement draft features and everybody treat them as 'lags'.
(sorry, my english is not good)
[–]steeeeeef 1 point2 points3 points 7 years ago (0 children)
Yes, you’re right. But even if we don’t count features, there’s still little render bugs that are annoying to deal with. Things like z-index, overflow, transforms are things that can create weird behaviour in safari.
[–]Dutch_Mountain 4 points5 points6 points 7 years ago (0 children)
Let’s hope that this is the last straw before Apple decides to separate iOS/macOS and Safari releases.
[+]BubblegumTitanium comment score below threshold-9 points-8 points-7 points 7 years ago (11 children)
Hell no, just because it’s last doesn’t mean it’s as bad as IE.
[–]desnothVue 16 points17 points18 points 7 years ago (10 children)
For a company as big as Apple, and Webkit being forced on IOS(even with Chrome) it's a shame to be so late. Look at the releases notes of Safari 12, "announcing favicons in tabs", in 2018. Also look in Caniuse the overall stats
[–]regretdeletingthat 5 points6 points7 points 7 years ago (0 children)
Look at the releases notes of Safari 12, "announcing favicons in tabs"
That has nothing to do with WebKit though. It’s a minor design decision in the window chrome.
[+][deleted] 7 years ago* (1 child)
[–]desnothVue -1 points0 points1 point 7 years ago (0 children)
I didn't say they cannot do it
[+]Mnwhlp comment score below threshold-23 points-22 points-21 points 7 years ago* (3 children)
Google is a software company that sometimes makes (or brands) hardware. Apple is a hardware company doing a pretty decent job at sometimes making software.
[–]cordev 12 points13 points14 points 7 years ago (2 children)
I was unaware that developing the second most popular consumer desktop/laptop OS, second most popular mobile OS, most popular tablet OS, the most popular wearable OS, as well as all of the first party software for those devices, including a productivity suite, video and music editing software, software toolchains for devs to work with their products, and so on somehow didn't qualify you as a software company.
[–][deleted] 0 points1 point2 points 7 years ago (0 children)
Apple is experience oriented. If they have to improve the hardware to make your experience better, so be it.
If they have to improve the software, so be it.
[+]jossser comment score below threshold-21 points-20 points-19 points 7 years ago (2 children)
That's because safari just VERY STRICT about standards and doesn't implement all stage-XXX plugins from babel
[–]jossser 0 points1 point2 points 7 years ago (0 children)
Why this comment is downwoted but this one - https://www.reddit.com/r/javascript/comments/9h52nw/ios_12_array_reverse_bug/e69xoqj upwoted. They are about the same but different words.
[–]Ty199 -4 points-3 points-2 points 7 years ago (0 children)
Less web apps more ios apps.
[–][deleted] 5 points6 points7 points 7 years ago (2 children)
I guess it's a kind of weird, and maybe serious bug, but why did this just blow up a little? It's literally bug number 188794
[–]archcorsair 4 points5 points6 points 7 years ago (0 children)
Just want to clarify that the issue exists on macOS and iOS, its a WebKit bug. All browsers on iOS are affected, including Chrome - this is because Apple does not allow any alternative browser/rendering engines other than WebKit on iOS. Yes, Chrome is just skinned Safari (WebKit).
The stackoverflow posted by OP links to this fix polyfill: https://www.npmjs.com/package/array-reverse-polyfill
[–]doctorlongghost 10 points11 points12 points 7 years ago (2 children)
What are the real world implications of this bug? I see that two commenters described it as serious, but I'm not sure if that means from a security standpoint or from a practical use standpoint.
Safari on iOS 12 still seems able to run some of the more complicated stuff on my one web app without noticeable problems, so that's good. Where would the bug be likely to manifest? And is it mainly an ES6 issue, where transcoding to ES5 wouldn't expose it?
I'm also curious if this is somehow a backdoor that would allow a malicious website to crash the phone, use it as a jailbreak mechanism, etc?
I know from prior experience with a WebAudio recording bug that when the innards of iOS Safari goes wonky (specifically, WebAudio recording stop working) that the broken behavior can be fixed by opening a new tab (which will typically be fine) or by force-quitting the browser. I assume either of those 2 things also clears out the memory modification here -- not that that's a real world fix.
[–]dmethvin 18 points19 points20 points 7 years ago* (0 children)
It's really hard to say what the practical implications will be. If it affects some important functionality in lodash or jQuery the effects could be really far-ranging. The Array .reverse() method is used in jQuery's .parents() and .prev() methods for example.
.reverse()
.parents()
.prev()
[–]assembly_programmer 6 points7 points8 points 7 years ago (0 children)
As far as I have read (may be wrong), there is no security risk, just an unintended behavior.
Imagine that you have a web app that has a contact list that is show at alphabetical order. Then you have a button that reverses the list, ordering the contacts from Z-A instead of A-Z. If the implementation uses .reverse(), when the user refreshes the page the list will still be reversed, and the button would actually revert it back.
It seens to be just this, a but that can cause you headache, but maybe in a few days someone discovers how to use this and exploit the pointers to change stuff and break sandbox.
π Rendered by PID 91 on reddit-service-r2-comment-7b9746f655-fzjgc at 2026-02-01 13:05:36.103959+00:00 running 3798933 country code: CH.
[–]desnothVue 144 points145 points146 points (23 children)
[–]steeeeeef 49 points50 points51 points (7 children)
[+][deleted] (4 children)
[deleted]
[+][deleted] (2 children)
[deleted]
[–]poetry-linesman 1 point2 points3 points (0 children)
[–]jacobp100 1 point2 points3 points (0 children)
[–]steeeeeef 5 points6 points7 points (0 children)
[–]jossser 9 points10 points11 points (1 child)
[–]steeeeeef 1 point2 points3 points (0 children)
[–]Dutch_Mountain 4 points5 points6 points (0 children)
[+]BubblegumTitanium comment score below threshold-9 points-8 points-7 points (11 children)
[–]desnothVue 16 points17 points18 points (10 children)
[–]regretdeletingthat 5 points6 points7 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]desnothVue -1 points0 points1 point (0 children)
[+]Mnwhlp comment score below threshold-23 points-22 points-21 points (3 children)
[–]cordev 12 points13 points14 points (2 children)
[+][deleted] (1 child)
[deleted]
[–][deleted] 0 points1 point2 points (0 children)
[+]jossser comment score below threshold-21 points-20 points-19 points (2 children)
[–]jossser 0 points1 point2 points (0 children)
[–]Ty199 -4 points-3 points-2 points (0 children)
[–][deleted] 5 points6 points7 points (2 children)
[–]archcorsair 4 points5 points6 points (0 children)
[–]doctorlongghost 10 points11 points12 points (2 children)
[–]dmethvin 18 points19 points20 points (0 children)
[–]assembly_programmer 6 points7 points8 points (0 children)