Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 334915 - [client][editor] Support Mobile Safari [iPad]
Summary: [client][editor] Support Mobile Safari [iPad]
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Client (show other bugs)
Version: 0.2   Edit
Hardware: PC iOS
: P3 normal (vote)
Target Milestone: 0.2   Edit
Assignee: Silenio Quarti CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 339427
  Show dependency tree
 
Reported: 2011-01-20 11:06 EST by Felipe Heidrich CLA
Modified: 2011-09-01 11:42 EDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Felipe Heidrich CLA 2011-01-20 11:06:20 EST
Support Mobile Safari.

Our initial investigation showed that at least the following changes are necessary:

-Remove contentEditable and use a hidden text area for input
-Remove scroll events and use gesture events for scrolling
-Remove mouse events and use gesture events for selecting text

Open problems:
-All the keyboard cursor navigation are useless (so it seems)
-Since the focus will be in the text area (to activate virtual keyboard) the native text selection will not be available in the editor div (an option is to use an emulated selection with background color)
-Since the native selection is not used the clipboard will not be available.

Note : More investigation is needed on how to control the browser native selection using js code.
Comment 1 Boris Bokowski CLA 2011-03-14 17:16:45 EDT
(In reply to comment #0)
> -All the keyboard cursor navigation are useless (so it seems)

Even when using (say) a bluetooth keyboard with the iPad?
Comment 2 Felipe Heidrich CLA 2011-04-07 11:41:39 EDT
== scrolling ==
it can be done using touch events

== input ==
it can be done using a text area


== selection ==
no good solution

option 1: emulated selection (uses a hidden text area for input)
cons:
- no system clipboard
- no system magnifier
- no system menu
- no native look

pros:
- good performance 

option 2: overlay text area (text area with all the content and full sized)
pros:
- system clipboard
- system magnifier
- system menu
- native look

cons:
- bad performance for large files (editing)
- limited css support for ranges (any style that changes the size of glyph will cause the styled content in the editor and the plain content in the text area to be at different location breaking hit test).
Comment 3 Silenio Quarti CLA 2011-04-20 11:05:30 EDT
I released initial support for the iPad. Option 1) was implemented (emulated selection).

What is the status?

- one finger scrolling with no inertial.
- one finger caret dragging with and without the magnifier lens (circle one). This gesture starts if the user touch and hold the screen for 200 milliseconds without moving the finger.  If the finger is moved before 200 milliseconds, the scrolling gesture starts.
- two finger selection (pinch gesture).
- grow the selection by grabbing one of the selection ends (one finger). There is no magnifier lens.
- editor gets focus by touching and holding one finger for some time.
- edition works with virtual and bluetooth keyboards. See some issues below.
- clicking on the overview ruler scrolls to the specified point.
- clipboard is working. The copy/cut/paste menu can be activated (when there is a selection) by touching a handle that is floating just above the selection. I was not able to make the menu appear automatically after a selection is made.

Issues:

- Paste menu (when there is no selection) does not show "Select" and "Select All" options.
- Shift select (arrow keys) with bluetooth keyboard does not work. Those keys do not seem to generate any event.
- cannot copy text when the keyboard is not active
- "javascript execution exceeded timeout" exception while selecting (some times). I am not sure what can be done here. The timeout seems to be too small for the speed of iPad 1 (need to try iPad 2).
- caret sometimes disappears. After pasting text for example. It comes back after the user types any key.
Comment 4 Simon Kaegi CLA 2011-04-21 00:52:21 EDT
Great job.
It's working quite well on the ipad2 and for fun i tried coding for the evening with it -- fwiw i never ran into the timeout problems you mentioned.

Some random thoughts...
- I was never able to get selection to work the way I wanted because of my fat fingers ;) To be honest I wonder if touch-based selection is as useful in touch interfaces. I sort of wished my two finger jestures zoomed instead of selected

- For actual coding I really missed the tab key (maybe time to switch to spaces) and the arrow keys for simple line navigation and selection

- no dirty state alert when i leave the page without saving

- when i went back and forward e.g. editor-navigator-editor it never returned back to the editor for some reason??

- no editor on the iphone
Comment 5 Silenio Quarti CLA 2011-04-21 14:17:16 EDT
(In reply to comment #4)
> Great job.
> It's working quite well on the ipad2 and for fun i tried coding for the evening
> with it -- fwiw i never ran into the timeout problems you mentioned.

The exception is silent (it only prints something to the console). Do you have to javascript console showing?

> 
> Some random thoughts...
> - I was never able to get selection to work the way I wanted because of my fat
> fingers ;) To be honest I wonder if touch-based selection is as useful in touch
> interfaces. I sort of wished my two finger jestures zoomed instead of selected

Maybe we can do something similar to what we did for scrolling/caret dragging. If the user click and hold the two fingers for some time, it starts selection. If the user click and move the two fingers right away, it starts zoom.  This might be tricky for people that have disabilities.

> 
> - no editor on the iphone

I believe the code for iPad should work on the iPhone as well. I will investigate once I can get a hold on an iPhone.
Comment 6 John Arthorne CLA 2011-05-20 09:16:01 EDT
Can this be marked fixed now? If not, please update the milestone.
Comment 7 Silenio Quarti CLA 2011-05-20 10:29:00 EDT
The initial support is release. Please open a new for any issues you might find.