IOS compatibility #37

Open
Gozala opened this Issue Jan 11, 2011 · 159 comments

Comments

Projects
None yet
@Gozala
Contributor

Gozala commented Jan 11, 2011

Ace could be a ideal editor on IOS devices (iPad, iPhone) if you just could type, but unfortunately virtual keyboard never shows up with ACE, also I believe someone had a patch for bespin to make that work.
@gissues:{"order":96.27329192546586,"status":"backlog"}

@sergi

This comment has been minimized.

Show comment
Hide comment
@sergi

sergi Jan 11, 2011

Contributor

We know, and it will be taken care of soon. Thanks for the suggestion!

Contributor

sergi commented Jan 11, 2011

We know, and it will be taken care of soon. Thanks for the suggestion!

@fjakobs

This comment has been minimized.

Show comment
Hide comment
@fjakobs

fjakobs Jan 11, 2011

Contributor

could you lookup the patch for us?

Contributor

fjakobs commented Jan 11, 2011

could you lookup the patch for us?

@glaforge

This comment has been minimized.

Show comment
Hide comment
@glaforge

glaforge Feb 10, 2011

I'm also interested in iOS (and particularly iPad) support.
Looking forward to hearing about your progress on that front.

I'm also interested in iOS (and particularly iPad) support.
Looking forward to hearing about your progress on that front.

@fjakobs

This comment has been minimized.

Show comment
Hide comment
@fjakobs

fjakobs Feb 11, 2011

Contributor

You can checkout the ipad branch. It is not perfect yet but at least typing works. Use two fingers to scroll.

Contributor

fjakobs commented Feb 11, 2011

You can checkout the ipad branch. It is not perfect yet but at least typing works. Use two fingers to scroll.

@glaforge

This comment has been minimized.

Show comment
Hide comment
@glaforge

glaforge Feb 11, 2011

Excellent, I hadn't noticed the ipad branch.
Thanks, I'll have a look at it!

Excellent, I hadn't noticed the ipad branch.
Thanks, I'll have a look at it!

@SunboX

This comment has been minimized.

Show comment
Hide comment
@SunboX

SunboX Mar 1, 2011

Contributor

The keyboard didn´t show using the ipad branch. Using the master branch it shows, but there´s a bug with the cursor positioning. :/

Contributor

SunboX commented Mar 1, 2011

The keyboard didn´t show using the ipad branch. Using the master branch it shows, but there´s a bug with the cursor positioning. :/

@SunboX

This comment has been minimized.

Show comment
Hide comment
@SunboX

SunboX Mar 3, 2011

Contributor

Forget what I've said! It's cool that the keyboard didn't show up! You could write your own keyboard, much friendlier for programmers and less space consuming. :o)

Contributor

SunboX commented Mar 3, 2011

Forget what I've said! It's cool that the keyboard didn't show up! You could write your own keyboard, much friendlier for programmers and less space consuming. :o)

@brion

This comment has been minimized.

Show comment
Hide comment
@brion

brion Apr 15, 2011

Testing on iPad running iOS 4.3; current master fails to show keyboard or insertion point, and doesn't scroll vertically (I can scroll horizontally with two fingers, if the text is wider than the available area).

iPad branch hasn't been updated since February 3... testing it, I see that vertical scrolling works with two fingers (yay!) but is very slow. I can put focus into the editor and pop up the on-screen keyboard, but the insertion point ends up flying off away from the editor when the window scrolls up to fit the keyboard.

Trying to tap around the editor seems problematic; I can sorta tap within the line being edited, but tapping other lines above seems to lose focus and closes the keyboard. I can only reliably put focus at the end of the document.

While scrolling vertically, the insertion point seems to jump up/down a line at a time, but when I start typing, it jumps back to the end of the document to add new chars.

brion commented Apr 15, 2011

Testing on iPad running iOS 4.3; current master fails to show keyboard or insertion point, and doesn't scroll vertically (I can scroll horizontally with two fingers, if the text is wider than the available area).

iPad branch hasn't been updated since February 3... testing it, I see that vertical scrolling works with two fingers (yay!) but is very slow. I can put focus into the editor and pop up the on-screen keyboard, but the insertion point ends up flying off away from the editor when the window scrolls up to fit the keyboard.

Trying to tap around the editor seems problematic; I can sorta tap within the line being edited, but tapping other lines above seems to lose focus and closes the keyboard. I can only reliably put focus at the end of the document.

While scrolling vertically, the insertion point seems to jump up/down a line at a time, but when I start typing, it jumps back to the end of the document to add new chars.

@brion

This comment has been minimized.

Show comment
Hide comment
@brion

brion Apr 15, 2011

(iPad branch on regular Firefox 4 also has issues -- it seems to make assumptions about the window's scroll position, and clicking in the editor ends up placing the caret at wrong position if I've scrolled the window down to fit the editor in the visible space.)

brion commented Apr 15, 2011

(iPad branch on regular Firefox 4 also has issues -- it seems to make assumptions about the window's scroll position, and clicking in the editor ends up placing the caret at wrong position if I've scrolled the window down to fit the editor in the visible space.)

@dmmalam

This comment has been minimized.

Show comment
Hide comment
@dmmalam

dmmalam Jul 17, 2011

any updates on the ipad branch?

dmmalam commented Jul 17, 2011

any updates on the ipad branch?

@fjakobs

This comment has been minimized.

Show comment
Hide comment
@fjakobs

fjakobs Jul 23, 2011

Contributor

Unfortunately not. This branch is currently not under active development. We plan to resurrect it but we have no estimated time when.

Contributor

fjakobs commented Jul 23, 2011

Unfortunately not. This branch is currently not under active development. We plan to resurrect it but we have no estimated time when.

@andrewheiss

This comment has been minimized.

Show comment
Hide comment
@andrewheiss

andrewheiss Feb 21, 2012

Sorry to resurrect a dead thread, but has there been any progress on the iOS front?

Sorry to resurrect a dead thread, but has there been any progress on the iOS front?

@levous

This comment has been minimized.

Show comment
Hide comment
@levous

levous Mar 29, 2012

Obviously, there is massive interest in this. Ill take a look and see if I can help

levous commented Mar 29, 2012

Obviously, there is massive interest in this. Ill take a look and see if I can help

@hjwp

This comment has been minimized.

Show comment
Hide comment
@hjwp

hjwp Apr 2, 2012

+1

hjwp commented Apr 2, 2012

+1

@matthew-dean

This comment has been minimized.

Show comment
Hide comment
@matthew-dean

matthew-dean Apr 2, 2012

A web-based component that doesn't support the iPad can no longer be rightfully called a web-based component, IMO.

A web-based component that doesn't support the iPad can no longer be rightfully called a web-based component, IMO.

@abacon

This comment has been minimized.

Show comment
Hide comment
@abacon

abacon Apr 5, 2012

I second this. I'm writing on an iPad right now, wishing that I were using ACE to be programming instead...

abacon commented Apr 5, 2012

I second this. I'm writing on an iPad right now, wishing that I were using ACE to be programming instead...

@velniukas

This comment has been minimized.

Show comment
Hide comment
@velniukas

velniukas Apr 5, 2012

+1 need this pretty urgently too on iPad

+1 need this pretty urgently too on iPad

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Apr 6, 2012

+1 to the urgency

ghost commented Apr 6, 2012

+1 to the urgency

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Apr 7, 2012

I would also like iOS support too, and very soon. If I can find the time, I'd be happy to sit down and do this myself. So if there are any pointers on where I should get started in the code, and details on how it's going wrong, it would be appreciated.

ghost commented Apr 7, 2012

I would also like iOS support too, and very soon. If I can find the time, I'd be happy to sit down and do this myself. So if there are any pointers on where I should get started in the code, and details on how it's going wrong, it would be appreciated.

@velniukas

This comment has been minimized.

Show comment
Hide comment
@velniukas

velniukas Apr 7, 2012

Agreed - I would contribute to a kickstarter fund to complete this if need be

On Sat, Apr 7, 2012 at 2:53 PM, Joe
reply@reply.github.com
wrote:

I would also like iOS support too, and very soon. If I can find the time, I'd be happy to sit down and do this myself. So if there are any pointers on where I should get started in the code, and details on how it's going wrong, it would be appreciated.


Reply to this email directly or view it on GitHub:
#37 (comment)

Agreed - I would contribute to a kickstarter fund to complete this if need be

On Sat, Apr 7, 2012 at 2:53 PM, Joe
reply@reply.github.com
wrote:

I would also like iOS support too, and very soon. If I can find the time, I'd be happy to sit down and do this myself. So if there are any pointers on where I should get started in the code, and details on how it's going wrong, it would be appreciated.


Reply to this email directly or view it on GitHub:
#37 (comment)

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Apr 7, 2012

There's no way of bringing that damn keyboard up with javascript, thumbs up for a custom keyboard.

ghost commented Apr 7, 2012

There's no way of bringing that damn keyboard up with javascript, thumbs up for a custom keyboard.

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Apr 8, 2012

Not true. Assign an element as content editable and them give it focus, and the keyboard should appear. You could also do tricks with textsreas and text inputs to get it working.

The keyboard also comes up with the version of Ace I'm using on my site, it's just not usable.

ghost commented Apr 8, 2012

Not true. Assign an element as content editable and them give it focus, and the keyboard should appear. You could also do tricks with textsreas and text inputs to get it working.

The keyboard also comes up with the version of Ace I'm using on my site, it's just not usable.

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Apr 8, 2012

@PlayMyCode If I can't call someting like ios.showKeyboard() than it's true that I can't bring it up whit javascript, this what you said are all quick fixes...

ghost commented Apr 8, 2012

@PlayMyCode If I can't call someting like ios.showKeyboard() than it's true that I can't bring it up whit javascript, this what you said are all quick fixes...

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Apr 8, 2012

It just doesn't work like that.

If the content isn't editable, or if it's not a text input, why would the keyboard be displayed? The characters won't go anywhere, you will not receive input from the keyboard.

The keys have to go somewhere for the keyboard to be displayed. If they don't have anywhere to go, then it doesn't appear. If they do have somewhere to go, it will appear. That's not a hack, it's just how text entry works.

ghost commented Apr 8, 2012

It just doesn't work like that.

If the content isn't editable, or if it's not a text input, why would the keyboard be displayed? The characters won't go anywhere, you will not receive input from the keyboard.

The keys have to go somewhere for the keyboard to be displayed. If they don't have anywhere to go, then it doesn't appear. If they do have somewhere to go, it will appear. That's not a hack, it's just how text entry works.

@hjwp

This comment has been minimized.

Show comment
Hide comment
@hjwp

hjwp Apr 8, 2012

@PlayMyCode - characters don't necessarily need a textinput to go to, they could just "go" to javascript -- if you had a set of keypress listeners, you'd be able to get the characters and put them wherever you wanted...

hjwp commented Apr 8, 2012

@PlayMyCode - characters don't necessarily need a textinput to go to, they could just "go" to javascript -- if you had a set of keypress listeners, you'd be able to get the characters and put them wherever you wanted...

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Apr 8, 2012

@hjwp your right, but again it's not that simple. I believe the elements must be able to obtain focus, or the browser will not send the event to the element, and many elements cannot receive focus. For example the canvas will only listen to key events if you add a tab index (or at least I am finding this just now in Chrome). iOS also only brings up the keyboard for canvas if you set content editable.

Either was this is an academic argument. iOS support is what is important, and it shouldn't be sidelined simply because a solution looks too much like a hack (unless of course there is a better alternative).

ghost commented Apr 8, 2012

@hjwp your right, but again it's not that simple. I believe the elements must be able to obtain focus, or the browser will not send the event to the element, and many elements cannot receive focus. For example the canvas will only listen to key events if you add a tab index (or at least I am finding this just now in Chrome). iOS also only brings up the keyboard for canvas if you set content editable.

Either was this is an academic argument. iOS support is what is important, and it shouldn't be sidelined simply because a solution looks too much like a hack (unless of course there is a better alternative).

@SunboX

This comment has been minimized.

Show comment
Hide comment
@SunboX

SunboX Apr 9, 2012

Contributor

How about putting the focus on an hidden text input and clearing this on keypress?

Contributor

SunboX commented Apr 9, 2012

How about putting the focus on an hidden text input and clearing this on keypress?

@matthew-dean

This comment has been minimized.

Show comment
Hide comment
@matthew-dean

matthew-dean Apr 9, 2012

Yep, that's how many WYSIWYGs work.

On 2012-04-09, at 4:56 AM, "André Fiedler"
reply@reply.github.com
wrote:

How about putting the focus on an hidden text input and clearing this on keypress?


Reply to this email directly or view it on GitHub:
#37 (comment)

Yep, that's how many WYSIWYGs work.

On 2012-04-09, at 4:56 AM, "André Fiedler"
reply@reply.github.com
wrote:

How about putting the focus on an hidden text input and clearing this on keypress?


Reply to this email directly or view it on GitHub:
#37 (comment)

@matthew-dean

This comment has been minimized.

Show comment
Hide comment
@matthew-dean

matthew-dean Apr 9, 2012

Wasn't older versions of Ace positioning a textarea or input element under entry, originally? That approach will bring up the keyboard.

Wasn't older versions of Ace positioning a textarea or input element under entry, originally? That approach will bring up the keyboard.

@nightwing

This comment has been minimized.

Show comment
Hide comment
@nightwing

nightwing Apr 9, 2012

Member

Wasn't older versions of Ace positioning a textarea or input element under entry, originally

new versions of ace do the same.
textarea goes out of sync with cursor while scrolling but that's easy to fix
i haven't seen ace on the ipad but on android typing and moving cursor around works, only there's no way select text.
but more importantly

  • ace on android browser is super slow, fennec is a little bit better but still unusable (maybe using setTimeout here with longer interval could help but not sure)
  • default keyboard and autocompletion suggestions are completely useless for programming (so making custom keyboard instead of trying to show default one seems like a good idea).
    overall i don't think ace can be useful on tablets yet.
Member

nightwing commented Apr 9, 2012

Wasn't older versions of Ace positioning a textarea or input element under entry, originally

new versions of ace do the same.
textarea goes out of sync with cursor while scrolling but that's easy to fix
i haven't seen ace on the ipad but on android typing and moving cursor around works, only there's no way select text.
but more importantly

  • ace on android browser is super slow, fennec is a little bit better but still unusable (maybe using setTimeout here with longer interval could help but not sure)
  • default keyboard and autocompletion suggestions are completely useless for programming (so making custom keyboard instead of trying to show default one seems like a good idea).
    overall i don't think ace can be useful on tablets yet.
@SunboX

This comment has been minimized.

Show comment
Hide comment
@SunboX

SunboX Apr 9, 2012

Contributor

custom keyboard sounds nice!

Contributor

SunboX commented Apr 9, 2012

custom keyboard sounds nice!

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Apr 10, 2012

I'm skeptical about a custom keyboard. Building a good, polished keyboard is not trivial, and is worthy of being a large project in its own right. I would also expect a pure HTML keyboard will be slower then the inbuilt one.

It would also need to work well on different screen sizes and different layout orientations. For example I wouldn't want to use the iPad keyboard on the iPhone, and its not nice using the iPhone keyboard on the iPad. They have different keyboards for a reason. Most of all it means everything on the iPad and iPhone uses one keyboard, except Ace. In short, users already have a keyboard they expect, and in many cases it's customized (like setup as a split keyboard).

My recommendation would be to just get the keyboard working, as I'd expect this would be less work then building a custom keyboard. Then worry about building a custom keyboard in the future as a seperate issue. It would also allow you to optionally fall back onto the OS keyboard as an alternative to a custom one, such as if it didn't work well on a particular device.

ghost commented Apr 10, 2012

I'm skeptical about a custom keyboard. Building a good, polished keyboard is not trivial, and is worthy of being a large project in its own right. I would also expect a pure HTML keyboard will be slower then the inbuilt one.

It would also need to work well on different screen sizes and different layout orientations. For example I wouldn't want to use the iPad keyboard on the iPhone, and its not nice using the iPhone keyboard on the iPad. They have different keyboards for a reason. Most of all it means everything on the iPad and iPhone uses one keyboard, except Ace. In short, users already have a keyboard they expect, and in many cases it's customized (like setup as a split keyboard).

My recommendation would be to just get the keyboard working, as I'd expect this would be less work then building a custom keyboard. Then worry about building a custom keyboard in the future as a seperate issue. It would also allow you to optionally fall back onto the OS keyboard as an alternative to a custom one, such as if it didn't work well on a particular device.

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Apr 10, 2012

This site also says you can turn auto complete and auto capitalisation off on particular inputs: http://davidbcalhoun.com/tag/javascript

ghost commented Apr 10, 2012

This site also says you can turn auto complete and auto capitalisation off on particular inputs: http://davidbcalhoun.com/tag/javascript

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Apr 10, 2012

A custom keyboard will also be unable to use the full screen width if Ace is placed within an iframe.

This might sound like a corner case, but both JSFiddle and JS.do.it allow you to embed editors within iframes on other sites, and it's something I'd like to do myself.

ghost commented Apr 10, 2012

A custom keyboard will also be unable to use the full screen width if Ace is placed within an iframe.

This might sound like a corner case, but both JSFiddle and JS.do.it allow you to embed editors within iframes on other sites, and it's something I'd like to do myself.

@matthew-dean

This comment has been minimized.

Show comment
Hide comment
@matthew-dean

matthew-dean Apr 10, 2012

@PlayMyCode - Seconded: a custom keyboard would be an extremely bad idea for many of the reasons you mentioned and more.

@PlayMyCode - Seconded: a custom keyboard would be an extremely bad idea for many of the reasons you mentioned and more.

@au-phiware

This comment has been minimized.

Show comment
Hide comment
@au-phiware

au-phiware Apr 16, 2012

@PlayMyCode - I agree, custom keyboard sounds perilous. I also suspect that those who have suggested it have little to no experience working with iOS APIs. But I could be wrong, im just going by what @cranic said about ios.showKeyboard(), the native APIs don't have anything equivalent to that... The closest would be calling becomeFirstResponder on a UITextInput control ...but I digress.

This should be entirely doable, probably with little effort. I'm guessing that it's along the lines of giving focus to an element that has contenteditable set. From iOS 5.0, contenteditable is supported, see the very end of Creating Compatible Web Content

@PlayMyCode - I agree, custom keyboard sounds perilous. I also suspect that those who have suggested it have little to no experience working with iOS APIs. But I could be wrong, im just going by what @cranic said about ios.showKeyboard(), the native APIs don't have anything equivalent to that... The closest would be calling becomeFirstResponder on a UITextInput control ...but I digress.

This should be entirely doable, probably with little effort. I'm guessing that it's along the lines of giving focus to an element that has contenteditable set. From iOS 5.0, contenteditable is supported, see the very end of Creating Compatible Web Content

@bertoltmeyer

This comment has been minimized.

Show comment
Hide comment
@bertoltmeyer

bertoltmeyer Apr 24, 2012

There is a JavaScript for editing code inside a browser that fires up a keyboard on iOS: CodeMirror, see e.g. http://codemirror.net/mode/r/index.html for a demo (works on the iPhone) and codemirror.net for general. So maybe there is something in their code that could help iOS support in ace?

There is a JavaScript for editing code inside a browser that fires up a keyboard on iOS: CodeMirror, see e.g. http://codemirror.net/mode/r/index.html for a demo (works on the iPhone) and codemirror.net for general. So maybe there is something in their code that could help iOS support in ace?

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Apr 24, 2012

@bertoltmeyer, CodeMirror is based on textareas, that's why it can open the iOS keyboard, ace is a lot more complicated...

ghost commented Apr 24, 2012

@bertoltmeyer, CodeMirror is based on textareas, that's why it can open the iOS keyboard, ace is a lot more complicated...

@nightwing

This comment has been minimized.

Show comment
Hide comment
@nightwing

nightwing Apr 24, 2012

Member

@cranic actually Codemirror2 is very similar to ace and uses, which uses the same textareas
if Codemirror2 works on ipad, fixing ace, to work the same way shouldn't be hard

Member

nightwing commented Apr 24, 2012

@cranic actually Codemirror2 is very similar to ace and uses, which uses the same textareas
if Codemirror2 works on ipad, fixing ace, to work the same way shouldn't be hard

@bertoltmeyer

This comment has been minimized.

Show comment
Hide comment
@bertoltmeyer

bertoltmeyer Apr 25, 2012

I am writing from the perspective of an R statistician who - like thousands of others - uses RStudio for coding. RStudio is the most popular IDE for R and is built on ace. If ace supported iOS, so would RStudio Server. In this ideal world, I could just access our RStudio Server from my iPad and do all my coding from there. I (and thousands of other R guys) wouldn't have to use my laptop any more. So seriously, ace's lack of support for iOS is the only reason why I am still carrying a laptop around and I am sure that there are loads of other people like me out there. So if I spoke javaScript, which I don't, I would be working on this with top priority. But since I cannot code in js, all I can really say is please please please please can someone try to fix this. Sigh. I (and others) would really support a kickstarter on this issue if necessary.

I am writing from the perspective of an R statistician who - like thousands of others - uses RStudio for coding. RStudio is the most popular IDE for R and is built on ace. If ace supported iOS, so would RStudio Server. In this ideal world, I could just access our RStudio Server from my iPad and do all my coding from there. I (and thousands of other R guys) wouldn't have to use my laptop any more. So seriously, ace's lack of support for iOS is the only reason why I am still carrying a laptop around and I am sure that there are loads of other people like me out there. So if I spoke javaScript, which I don't, I would be working on this with top priority. But since I cannot code in js, all I can really say is please please please please can someone try to fix this. Sigh. I (and others) would really support a kickstarter on this issue if necessary.

@ertug2

This comment has been minimized.

Show comment
Hide comment
@ertug2

ertug2 Mar 9, 2015

+1 for scrolling problems.

ertug2 commented Mar 9, 2015

+1 for scrolling problems.

@iq77

This comment has been minimized.

Show comment
Hide comment
@iq77

iq77 Mar 10, 2015

Hello guys, I'm not good / patient enough to fix the editor itself, since the whole concept of touch vs. mouse is different. But with the script below, you can get ACE editor to scroll on touch devices (IOS / Android). Just put it into the configuration section of the editor (where the editor is declared, and options are added).

http://pastebin.com/1Rh7UDea

iq77 commented Mar 10, 2015

Hello guys, I'm not good / patient enough to fix the editor itself, since the whole concept of touch vs. mouse is different. But with the script below, you can get ACE editor to scroll on touch devices (IOS / Android). Just put it into the configuration section of the editor (where the editor is declared, and options are added).

http://pastebin.com/1Rh7UDea

@tluyben

This comment has been minimized.

Show comment
Hide comment
@tluyben

tluyben Mar 12, 2015

@iq77 What is that code supposed to do? I am trying it and so far it makes no difference? I'm one of the people who really would like this to work normally on touch devices...

tluyben commented Mar 12, 2015

@iq77 What is that code supposed to do? I am trying it and so far it makes no difference? I'm one of the people who really would like this to work normally on touch devices...

@iq77

This comment has been minimized.

Show comment
Hide comment
@iq77

iq77 Mar 12, 2015

@tluyben on "touchstart" it saves the x/y coordinates of the touch event. On "touchmove" calculates the difference between start and end, then passes the x/y values to ACE's "renderer". The renderer does the scrolling. It works on my script, but maybe you have to adapt some class names etc. to your own needs. Also there is some jQuery in there, you might have to replace this.

iq77 commented Mar 12, 2015

@tluyben on "touchstart" it saves the x/y coordinates of the touch event. On "touchmove" calculates the difference between start and end, then passes the x/y values to ACE's "renderer". The renderer does the scrolling. It works on my script, but maybe you have to adapt some class names etc. to your own needs. Also there is some jQuery in there, you might have to replace this.

@tumnus123

This comment has been minimized.

Show comment
Hide comment
@tumnus123

tumnus123 Mar 27, 2015

This is a great thread, but I found it difficult to tell (a) what the nature of the "scrolling issue" is, (b) what devices/OS versions are affected, and (c) what workarounds are available. If someone would be willing to summarize where these are at, that would be superb.

I just tested the Kitchen Sink on [iPad Air 2 running iOS 8 and Safari 8] and [Nexus 10 running Android 5.1 and Chrome 40], and was able to scroll both horizontally and vertically (in landscape; I did not test with devices in portrait orientation). Steps to repro:

  1. Browse to http://ace.c9.io/build/kitchen-sink.html
  2. Add a bunch of lines (blank lines work fine) in the editor pane until there are more lines than will fit on the screen.
  3. If needed, zoom out to view the full browser. (Editing the contents of the editor pane may automatically zoom you in, making it difficult to tell whether you're scrolling the pane or just moving the zoomed-in view around.)
  4. Swipe up/down on the very right edge of the editor pane. No scrollbar will appear, but the editor pane contents should scroll as expected.
  5. To test hscroll, create a long string of characters that's wider than what will fit on the screen; zoom out if needed; swipe left/right on the very bottom edge of the editor pane. I see a fading scrollbar on Android, but no scrollbar on iOS... but hscrolling works on both, regardless.

This is a great thread, but I found it difficult to tell (a) what the nature of the "scrolling issue" is, (b) what devices/OS versions are affected, and (c) what workarounds are available. If someone would be willing to summarize where these are at, that would be superb.

I just tested the Kitchen Sink on [iPad Air 2 running iOS 8 and Safari 8] and [Nexus 10 running Android 5.1 and Chrome 40], and was able to scroll both horizontally and vertically (in landscape; I did not test with devices in portrait orientation). Steps to repro:

  1. Browse to http://ace.c9.io/build/kitchen-sink.html
  2. Add a bunch of lines (blank lines work fine) in the editor pane until there are more lines than will fit on the screen.
  3. If needed, zoom out to view the full browser. (Editing the contents of the editor pane may automatically zoom you in, making it difficult to tell whether you're scrolling the pane or just moving the zoomed-in view around.)
  4. Swipe up/down on the very right edge of the editor pane. No scrollbar will appear, but the editor pane contents should scroll as expected.
  5. To test hscroll, create a long string of characters that's wider than what will fit on the screen; zoom out if needed; swipe left/right on the very bottom edge of the editor pane. I see a fading scrollbar on Android, but no scrollbar on iOS... but hscrolling works on both, regardless.

@DanielHitchen DanielHitchen referenced this issue in octobercms/october Mar 30, 2015

Closed

Scrolling doesn't work on iPad/iPhone #1030

@nightwing nightwing referenced this issue May 5, 2015

Closed

Touch ios #2474

@barneycarroll

This comment has been minimized.

Show comment
Hide comment
@barneycarroll

barneycarroll Jun 17, 2015

I've been searching through the issues and from what I can work out this is the definitive 'everything touch-related' thread. Correct me if I'm wrong and I'll keep digging / file a new issue.

iOS touch is seemingly unable to bring up the context menu in an Ace context (significantly, this allows cut + paste). Normally this can be triggered by tapping the cursor, but Ace overrides this behaviour to move the cursor forward by one character instead.

I've been searching through the issues and from what I can work out this is the definitive 'everything touch-related' thread. Correct me if I'm wrong and I'll keep digging / file a new issue.

iOS touch is seemingly unable to bring up the context menu in an Ace context (significantly, this allows cut + paste). Normally this can be triggered by tapping the cursor, but Ace overrides this behaviour to move the cursor forward by one character instead.

@AStoker

This comment has been minimized.

Show comment
Hide comment
@AStoker

AStoker Jun 17, 2015

@barneycarroll, this does seem to be the touch related thread. I've been working recently trying to get at least some touch support implemented for scrolling. Right now, you can scroll if you scroll over just the right area in the far right or bottom of the editor viewspace (where the scroll bars would be). But that's not a viable solution.

I think I'm on to something with getting some touch support implemented, I have it working on the iOS simulator. Check out the fork (https://github.com/AStoker/ace), you currently need to build it to compile (as that is the source code), but if you follow the build instructions in the realm, it's cake. I would love some help with any improvements, as it doesn't seem that touch support is a high priority right now (but that's the benefit of open source, we can fix it ourselves). If everything looks good, I'll make a pull request to get it implemented.

AStoker commented Jun 17, 2015

@barneycarroll, this does seem to be the touch related thread. I've been working recently trying to get at least some touch support implemented for scrolling. Right now, you can scroll if you scroll over just the right area in the far right or bottom of the editor viewspace (where the scroll bars would be). But that's not a viable solution.

I think I'm on to something with getting some touch support implemented, I have it working on the iOS simulator. Check out the fork (https://github.com/AStoker/ace), you currently need to build it to compile (as that is the source code), but if you follow the build instructions in the realm, it's cake. I would love some help with any improvements, as it doesn't seem that touch support is a high priority right now (but that's the benefit of open source, we can fix it ourselves). If everything looks good, I'll make a pull request to get it implemented.

laughinghan referenced this issue in mathquill/mathquill Aug 6, 2015

@tluyben

This comment has been minimized.

Show comment
Hide comment
@tluyben

tluyben Sep 29, 2015

+1 for copy/paste in iOS. The problem is the custom cursor handling? What would be a plan of attack to resolve that?

tluyben commented Sep 29, 2015

+1 for copy/paste in iOS. The problem is the custom cursor handling? What would be a plan of attack to resolve that?

@paladox

This comment has been minimized.

Show comment
Hide comment
@paladox

paladox Nov 19, 2015

Contributor

IPhone 6 plus ios 9.2 public beta seems to work well now with ace. Scrolling works and editing works as if your on computer.

Just needs improvements in copying and pasting.

It is possible to paste and copy but very hard to do it.

Contributor

paladox commented Nov 19, 2015

IPhone 6 plus ios 9.2 public beta seems to work well now with ace. Scrolling works and editing works as if your on computer.

Just needs improvements in copying and pasting.

It is possible to paste and copy but very hard to do it.

@jeremy50dj

This comment has been minimized.

Show comment
Hide comment
@jeremy50dj

jeremy50dj Nov 22, 2015

Http://www.apus.com
On Nov 19, 2015 10:52 AM, "paladox" notifications@github.com wrote:

IPhone 6 plus ios 9.2 public beta seems to work well now with ace.
Scrolling works and editing works as if your on computer.

Just needs improvements in copying and pasting.

It is possible to paste and copy but very hard to do it.


Reply to this email directly or view it on GitHub.

Http://www.apus.com
On Nov 19, 2015 10:52 AM, "paladox" notifications@github.com wrote:

IPhone 6 plus ios 9.2 public beta seems to work well now with ace.
Scrolling works and editing works as if your on computer.

Just needs improvements in copying and pasting.

It is possible to paste and copy but very hard to do it.


Reply to this email directly or view it on GitHub.

@Bennimaxx

This comment has been minimized.

Show comment
Hide comment
@Bennimaxx

Bennimaxx Mar 11, 2016

I have problems with the arrow keys on my IPad keyboard. The keyboard works fine in every environment but if I connect to my cloud 9 Server and start to programming, the arrow keys are ignored. Can I add them somewhere or how can this be fixed? I need the arrow very often while coding.

I have problems with the arrow keys on my IPad keyboard. The keyboard works fine in every environment but if I connect to my cloud 9 Server and start to programming, the arrow keys are ignored. Can I add them somewhere or how can this be fixed? I need the arrow very often while coding.

@jonas-schievink jonas-schievink referenced this issue in rust-lang/rust-playpen Mar 19, 2016

Open

Mobile Freindly #170

@hocker-app

This comment has been minimized.

Show comment
Hide comment
@hocker-app

hocker-app Mar 30, 2016

<div id="editor" class="page-content" contenteditable="true"></div>

Does the trick in iOS. Just can't seem to get assembly_x86 syntax highlighting to work.

<div id="editor" class="page-content" contenteditable="true"></div>

Does the trick in iOS. Just can't seem to get assembly_x86 syntax highlighting to work.

@Bennimaxx

This comment has been minimized.

Show comment
Hide comment
@Bennimaxx

Bennimaxx Mar 30, 2016

Where do I have to include this code? I thought this must be in the user.settings but there It has no HTML parts

Where do I have to include this code? I thought this must be in the user.settings but there It has no HTML parts

@hocker-app

This comment has been minimized.

Show comment
Hide comment
@hocker-app

hocker-app Mar 31, 2016

HTML inside a WebView.

HTML inside a WebView.

@yckart yckart referenced this issue in babel/website Apr 2, 2016

Closed

Add option to disable ACE editor #773

@facundomedica

This comment has been minimized.

Show comment
Hide comment
@facundomedica

facundomedica Jul 16, 2016

Can't get it to work inside a UIWebView 👎 It starts ok, but as soon as I try to move the cursor, everything fails. I cannot write, or with @jcss-org-il solution (<div id="editor" class="page-content" contenteditable="true"></div>) the cursor moves outside the editor.

Can't get it to work inside a UIWebView 👎 It starts ok, but as soon as I try to move the cursor, everything fails. I cannot write, or with @jcss-org-il solution (<div id="editor" class="page-content" contenteditable="true"></div>) the cursor moves outside the editor.

@realgenekim

This comment has been minimized.

Show comment
Hide comment
@realgenekim

realgenekim Aug 18, 2016

Can someone help me solve a mystery? The GitHub online code editor, allegedly based on Ace (https://github.com/blog/905-edit-like-an-ace), is amazing. It runs flawlessly on the iPad, including with a Bluetooth keyboard, the arrow keys work (including Ctrl-Left Arrow, Alt-Left Arrow, etc), and performance is great, etc.

Here's a screenshot of an iPad editing session of the README.md file of this repo: (https://github.com/ajaxorg/ace/edit/master/Readme.md)

img_0819

And yet, everyone on this thread (myself included), can't get Ace to run on an iPad without problems (e.g., arrow keys don't work). (I have the same issues as reported here: #37 (comment))

Is GitHub running a custom version of Ace? Is that version publicly available? I'd love to run whatever they're running! (Screenshot of DOM inspector confirming that it appears to be running Ace at bottom.)

Thank you so much!
G

editing_ace_readme_md_at_master_ _ajaxorg_ace

realgenekim commented Aug 18, 2016

Can someone help me solve a mystery? The GitHub online code editor, allegedly based on Ace (https://github.com/blog/905-edit-like-an-ace), is amazing. It runs flawlessly on the iPad, including with a Bluetooth keyboard, the arrow keys work (including Ctrl-Left Arrow, Alt-Left Arrow, etc), and performance is great, etc.

Here's a screenshot of an iPad editing session of the README.md file of this repo: (https://github.com/ajaxorg/ace/edit/master/Readme.md)

img_0819

And yet, everyone on this thread (myself included), can't get Ace to run on an iPad without problems (e.g., arrow keys don't work). (I have the same issues as reported here: #37 (comment))

Is GitHub running a custom version of Ace? Is that version publicly available? I'd love to run whatever they're running! (Screenshot of DOM inspector confirming that it appears to be running Ace at bottom.)

Thank you so much!
G

editing_ace_readme_md_at_master_ _ajaxorg_ace

@nightwing

This comment has been minimized.

Show comment
Hide comment
@nightwing

nightwing Aug 21, 2016

Member

@realgenekim from screenshot it looks like github uses a textarea on ipad

Member

nightwing commented Aug 21, 2016

@realgenekim from screenshot it looks like github uses a textarea on ipad

@realgenekim

This comment has been minimized.

Show comment
Hide comment
@realgenekim

realgenekim Aug 23, 2016

@nightwing Fascinating theory! But, if you look at the editor control, there are line numbers, Ace-like capabilities that seem like it's not just a standard HTML textarea, like tab width, text wrapping...

Upon some closer inspection, I'm pretty sure it's something more exotic than textarea!

@nightwing Fascinating theory! But, if you look at the editor control, there are line numbers, Ace-like capabilities that seem like it's not just a standard HTML textarea, like tab width, text wrapping...

Upon some closer inspection, I'm pretty sure it's something more exotic than textarea!

@nightwing

This comment has been minimized.

Show comment
Hide comment
@nightwing

nightwing Aug 23, 2016

Member

@realgenekim line numbers are only in the second screenshot, which doesn't look like ipad

Member

nightwing commented Aug 23, 2016

@realgenekim line numbers are only in the second screenshot, which doesn't look like ipad

@realgenekim

This comment has been minimized.

Show comment
Hide comment
@realgenekim

realgenekim Aug 24, 2016

@nightwing Holy cow. That's so intriguing — I think you're absolutely correct. I'll try to get some confirmation of this from someone at GitHub...

I think this means I'll try doing the same thing. I.e., detect at run-time whether it's an iPad, and not load Ace editor, and instead just use a textarea.

So unsatisfying, but at least it will be usable until someone comes up with a good iPad solution...

😦

realgenekim commented Aug 24, 2016

@nightwing Holy cow. That's so intriguing — I think you're absolutely correct. I'll try to get some confirmation of this from someone at GitHub...

I think this means I'll try doing the same thing. I.e., detect at run-time whether it's an iPad, and not load Ace editor, and instead just use a textarea.

So unsatisfying, but at least it will be usable until someone comes up with a good iPad solution...

😦

@ebertmi

This comment has been minimized.

Show comment
Hide comment
@ebertmi

ebertmi Aug 24, 2016

Just tested this on my iPad pro and it basically shows an basic textarea. Maybe with auto grow.

ebertmi commented Aug 24, 2016

Just tested this on my iPad pro and it basically shows an basic textarea. Maybe with auto grow.

@barneycarroll

This comment has been minimized.

Show comment
Hide comment
@barneycarroll

barneycarroll Aug 24, 2016

Is it something clever like a textarea with 0 opacity & an ace editor instance positioned immediately behind it? I imagine with modern iPad performance it would be possible to persist state (inner scroll & content) almost instantly on each input event…

Is it something clever like a textarea with 0 opacity & an ace editor instance positioned immediately behind it? I imagine with modern iPad performance it would be possible to persist state (inner scroll & content) almost instantly on each input event…

@ebertmi

This comment has been minimized.

Show comment
Hide comment
@ebertmi

ebertmi Aug 24, 2016

@barneycarroll No, at least in my tests I was editing inside a normal text area without line numbers etc.

ebertmi commented Aug 24, 2016

@barneycarroll No, at least in my tests I was editing inside a normal text area without line numbers etc.

@etamponi

This comment has been minimized.

Show comment
Hide comment
@etamponi

etamponi Dec 20, 2016

Contributor

Hey guys! I've just created a pull request that fixes some of the issues on iOS. It provides a nice user experience, if you've an external keyboard.

If you like it, I might think of fixing the remaining issues :)

You can see it in action on https://ipad-undo.gomix.me

Enjoy!

Contributor

etamponi commented Dec 20, 2016

Hey guys! I've just created a pull request that fixes some of the issues on iOS. It provides a nice user experience, if you've an external keyboard.

If you like it, I might think of fixing the remaining issues :)

You can see it in action on https://ipad-undo.gomix.me

Enjoy!

@IamNaN

This comment has been minimized.

Show comment
Hide comment
@IamNaN

IamNaN Dec 20, 2016

Just using your demo and I'm seeing a problem with the insertion point. Create a pair of quotes, for example, put the cursor between them, and start typing. It randomly jumps to the end of the line. I'm not sure if this change introduces that problem or if it was there initially.

IamNaN commented Dec 20, 2016

Just using your demo and I'm seeing a problem with the insertion point. Create a pair of quotes, for example, put the cursor between them, and start typing. It randomly jumps to the end of the line. I'm not sure if this change introduces that problem or if it was there initially.

@etamponi

This comment has been minimized.

Show comment
Hide comment
@etamponi

etamponi Dec 21, 2016

Contributor

Oh, thanks @IamNaN , that bug has been reported in the PR right now :) I think I know how to fix it... stay tuned on the demo :)

EDIT: demo fixed :)

Contributor

etamponi commented Dec 21, 2016

Oh, thanks @IamNaN , that bug has been reported in the PR right now :) I think I know how to fix it... stay tuned on the demo :)

EDIT: demo fixed :)

@episodeyang

This comment has been minimized.

Show comment
Hide comment
@episodeyang

episodeyang Jan 11, 2017

@etamponi That look awesome! Does it work with:

  1. Plug in like vim and emac?
  2. IME support with CKJ?

Currently it looks like it messes up when you turn on IME.

@etamponi That look awesome! Does it work with:

  1. Plug in like vim and emac?
  2. IME support with CKJ?

Currently it looks like it messes up when you turn on IME.

@etamponi

This comment has been minimized.

Show comment
Hide comment
@etamponi

etamponi Jun 17, 2017

Contributor

@episodeyang I am really sorry I left you on hold on this.

Unfortunately I didn't have the time to keep working on the PR... Luckily someone else took over my work and finished it, now it is merged as #3310 if I remember correctly :)

vim was already unsupported on iOS, and the PR doesn't add support for it. I don't know enough about IME to know for sure if my PR affected it in any way, sorry!

Contributor

etamponi commented Jun 17, 2017

@episodeyang I am really sorry I left you on hold on this.

Unfortunately I didn't have the time to keep working on the PR... Luckily someone else took over my work and finished it, now it is merged as #3310 if I remember correctly :)

vim was already unsupported on iOS, and the PR doesn't add support for it. I don't know enough about IME to know for sure if my PR affected it in any way, sorry!

@exsilium exsilium referenced this issue in exsilium/cloud9 Oct 12, 2017

Closed

iPad Pro basic compatibility #33

9 of 9 tasks complete
@adam

This comment has been minimized.

Show comment
Hide comment
@adam

adam Dec 11, 2017

Placing the cursor mid-word via a tap seems to be hit-or-miss (iOS 11.2, Safari) on the demo provided by @etamponi - Is there a way to make that more reliable?

adam commented Dec 11, 2017

Placing the cursor mid-word via a tap seems to be hit-or-miss (iOS 11.2, Safari) on the demo provided by @etamponi - Is there a way to make that more reliable?

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