Permalink
Browse files

trying contenteditable on ios5

  • Loading branch information...
1 parent bc3260c commit be9bfc6e62cc8be3f80b76bb4ac2da25df1939dc @remy committed Aug 29, 2011
Showing with 1 addition and 5 deletions.
  1. +1 −5 console.js
View
@@ -694,11 +694,7 @@ var exec = document.getElementById('exec'),
// I hate that I'm browser sniffing, but there's issues with Firefox and execCommand so code completion won't work
iOSMobile = navigator.userAgent.indexOf('AppleWebKit') !== -1 && navigator.userAgent.indexOf('Mobile') !== -1,
// TODO try and detect this - currently Firefox doesn't allow me to clear the contents :(
- enableCC = navigator.userAgent.indexOf('AppleWebKit') !== -1 && navigator.userAgent.indexOf('Mobile') === -1 && navigator.userAgent.indexOf('iPhone OS 5_0') !== -1;
-
-if (iOSMobile) enableCC = true;
-
-iOSMobile = true;
+ enableCC = navigator.userAgent.indexOf('AppleWebKit') !== -1 && navigator.userAgent.indexOf('Mobile') === -1 || navigator.userAgent.indexOf('iPhone OS 5') !== -1;
if (enableCC) {
exec.parentNode.innerHTML = '<div autofocus id="exec" spellcheck="false"><span id="cursor" contenteditable></span></div>';

0 comments on commit be9bfc6

Please sign in to comment.