Crashing Safari on iOS With CSS

| Comments

Safari on iOS can be frustrating. Especially if the browser crashes for some weird reason without leaving you a single error message behind.

For example this simple snippet will your mobile browser script-less.

1
2
3
4
<label>
  <input type="checkbox" />
  A checkbox
</label>

Just make your checkbox barely visible (1x1).

1
2
3
4
input[type="checkbox"] {
  width: 1px;
  height: 1px;
}

A click on the label will bring the browser to his knees. No further notice. If you doubt it, try it out – (the simulator crashes as well).

Copyright © 2014 - Damien Antipa. Powered by Octopress