Questions tagged [safari]

Safari is Apple's web browser, the default browser on macOS and iOS.

Safari is the web browser bundled with iOS and macOS, operating systems from Apple. Previously, Windows was a supported platform but was discontinued after version 5.

Safari uses the WebKit rendering engine and the JavaScript Core JavaScript engine.

For Safari for iOS devices, there is the tag.

Documentation

17726 questions
110
votes
15 answers

iOS Safari – How to disable overscroll but allow scrollable divs to scroll normally?

I'm working on an iPad-based web app, and need to prevent overscrolling so that it seems less like a web page. I'm currently using this to freeze the viewport and disable overscroll: document.body.addEventListener('touchmove',function(e){ …
Jeff
  • 1,294
  • 2
  • 9
  • 6
109
votes
1 answer

SVG changes color when rotated in Safari 10

I've just run into a very weird problem that only shows up in Safari 10. I have playing cards, svg images, that are sometimes rotated using transform:rotate(xdeg). The card I'm using has a red block pattern. When it's not rotated, or rotated at…
Einar Egilsson
  • 3,438
  • 9
  • 36
  • 47
104
votes
7 answers

Safari ignoring tabindex

I have 2 buttons next to a textbox and another textbox after the 2 buttons. The tabindex for the first textbox is 1000, the first button is 1001 and the second button is 1002. The second textbox has a tabindex of 1003. When I press tab, the…
DLS
  • 5,313
  • 8
  • 37
  • 50
103
votes
3 answers

Flex / Grid layouts not working on button or fieldset elements

I'm trying to center inner elements of a
Ingemar
  • 1,638
  • 2
  • 12
  • 15
98
votes
3 answers

How to Inspect Element using Safari Browser

I am developing websites and creating applications. I want to know how to inspect an element through web browsers like safari. In normal Chrome, Firefox, Explorer or any other browsers, we will right click the mouse button or press Function Key F12…
Deepak Keynes
  • 2,291
  • 5
  • 27
  • 56
98
votes
12 answers

Safari in ios8 is scrolling screen when fixed elements get focus

In IOS8 Safari there is a new bug with position fixed. If you focus a textarea that is in a fixed panel, safari will scroll you to the bottom of the page. This makes all sorts of UIs impossible to work with, since you have no way of entering text…
Sam Saffron
  • 128,308
  • 78
  • 326
  • 506
97
votes
8 answers

Prevent safari loading from cache when back button is clicked

Got an issue with safari loading old youtube videos when back button is clicked. I have tried adding onunload="" (mentioned here Preventing cache on back-button in Safari 5) to the body tag but it doesn't work in this case. Is there any way to…
Mark Steggles
  • 5,369
  • 8
  • 40
  • 50
95
votes
9 answers

HTML5 date picker doesn't show on Safari

Having previously used jQuery date picker, I have now converted some of the date fields in forms on my website to the HTML5 date picker. On the documentation, it says Safari is supported: however, it currently shows just a text field (whereas Chrome…
Will WP
  • 1,225
  • 1
  • 9
  • 19
95
votes
10 answers

Eliminate 300ms delay on click events in mobile Safari

I've read that mobile Safari has a 300ms delay on click events from the time the link/button is clicked to the time the event fires. The reason for the delay is to wait to see if the user intends to double-click, but from a UX perspective waiting…
tim peterson
  • 23,653
  • 59
  • 177
  • 299
93
votes
1 answer

What happens when localStorage is full?

I have found articles regarding cache behaviour so I can only assume that it's not much different but I wanted to make sure. I have read that most browser have 5MB (give or take) for localStorage and I was interested in what would be the behaviour…
eric.itzhak
  • 15,752
  • 26
  • 89
  • 142
89
votes
10 answers

Programmatically selecting text in an input field on iOS devices (mobile Safari)

How do you programmatically select the text of an input field on iOS devices, e.g. iPhone, iPad running mobile Safari? Normally it is sufficient to call the .select() function on the element, but this does not work on those devices. …
sroebuck
  • 6,060
  • 4
  • 25
  • 18
87
votes
5 answers

Firing a Keyboard Event in Safari, using JavaScript

I'm trying to simulate a keyboard event in Safari using JavaScript. I have tried this: var event = document.createEvent("KeyboardEvent"); event.initKeyboardEvent("keypress", true, true, null, false, false, false, false, 115, 0); ...and also…
Steve Harrison
  • 121,227
  • 16
  • 87
  • 72
87
votes
2 answers

iPhone browser defaulting to uppercase for first letter of password fields

I'm writing a login page for a mobile version of my webapp and I have a simple HTML password field like so: The only problem is that the iPhone Safari browser capitalizes the first letter of the input by…
Rory Harvey
  • 2,579
  • 2
  • 22
  • 27
87
votes
18 answers

Safari Web inspector keeps disconnecting

I've Safari 8.0.6 with iOS 8.3 on my iPad, while debugging through Web Inspector on my Mac (10.10.3), the connection keeps on disconnecting (I don't see the device name under Develop menu upon disconnection) but can resume if I quit safari followed…
user2727195
  • 7,122
  • 17
  • 70
  • 118
85
votes
13 answers

jQuery .load() call doesn't execute JavaScript in loaded HTML file

This seems to be a problem related to Safari only. I've tried 4 on Mac and 3 on Windows and am still having no luck. I'm trying to load an external HTML file and have the JavaScript that is embedded execute. The code I'm trying to use is…
Mike
  • 2,716
  • 4
  • 26
  • 27