New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IOS compatibility #37
Comments
We know, and it will be taken care of soon. Thanks for the suggestion! |
could you lookup the patch for us? |
I'm also interested in iOS (and particularly iPad) support. |
You can checkout the ipad branch. It is not perfect yet but at least typing works. Use two fingers to scroll. |
Excellent, I hadn't noticed the ipad branch. |
The keyboard didn´t show using the ipad branch. Using the master branch it shows, but there´s a bug with the cursor positioning. :/ |
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) |
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. |
(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.) |
any updates on the ipad branch? |
Unfortunately not. This branch is currently not under active development. We plan to resurrect it but we have no estimated time when. |
Sorry to resurrect a dead thread, but has there been any progress on the iOS front? |
Obviously, there is massive interest in this. Ill take a look and see if I can help |
+1 |
A web-based component that doesn't support the iPad can no longer be rightfully called a web-based component, IMO. |
I second this. I'm writing on an iPad right now, wishing that I were using ACE to be programming instead... |
+1 need this pretty urgently too on iPad |
+1 to the urgency |
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. |
Agreed - I would contribute to a kickstarter fund to complete this if need be On Sat, Apr 7, 2012 at 2:53 PM, Joe
|
There's no way of bringing that damn keyboard up with javascript, thumbs up for a custom keyboard. |
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. |
@PlayMyCode If I can't call someting like |
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. |
@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 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). |
How about putting the focus on an hidden text input and clearing this on keypress? |
Yep, that's how many WYSIWYGs work. On 2012-04-09, at 4:56 AM, "André Fiedler"
|
Wasn't older versions of Ace positioning a textarea or input element under entry, originally? That approach will bring up the keyboard. |
new versions of ace do the same.
|
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. |
Http://www.apus.com
|
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. |
Does the trick in iOS. Just can't seem to get assembly_x86 syntax highlighting to work. |
Where do I have to include this code? I thought this must be in the user.settings but there It has no HTML parts |
HTML inside a WebView. |
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 ( |
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) 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! |
@realgenekim from screenshot it looks like github uses a textarea on ipad |
@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! |
@realgenekim line numbers are only in the second screenshot, which doesn't look like ipad |
@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... 😦 |
Just tested this on my iPad pro and it basically shows an basic |
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… |
@barneycarroll No, at least in my tests I was editing inside a normal text area without line numbers etc. |
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! |
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. |
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 :) |
@etamponi That look awesome! Does it work with:
Currently it looks like it messes up when you turn on IME. |
@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! |
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? |
Currently ace works well enough on IOS to close this issue about the basic compatibility. If you see any bugs or missing features, please open a new issue. |
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"}
The text was updated successfully, but these errors were encountered: