Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 346347

Summary: swt.Browser widget does not play well with Orion Editor on Mac and Linux
Product: [ECD] Orion Reporter: Dean Roberts <dean.t.roberts>
Component: ClientAssignee: Project Inbox <e4.orion-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: eclipse.felipe, grant_gayed, Silenio_Quarti
Version: 0.2   
Target Milestone: 0.2   
Hardware: Macintosh   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
patch none

Description Dean Roberts CLA 2011-05-18 17:31:52 EDT
Build Identifier: 3.7.0  I20110426-2000

Running the orion editor inside an swt.Browser widget on Mac and Unix causes some odd results.  The editor does work fine in an swt.Browser widget on Windows.

On Mac using windows toolkit the insertion i-beam is invisible, returns inserts a blank line and up arrow inserts the hollow square character.

On a recent version of wtk-gtk we see the same behaviour as the Mac except for the arrow key problem.

On a recent version of Motiff on Linux everything works as well as on Windows.

I see these results when running the org.eclipse.e4.examples.webintegration.orion.editor.plugin which you can find in dev.eclipse.org/cvsroot/eclipse/e4/org.eclipse.e4.ui/examples

Reproducible: Always
Comment 1 Felipe Heidrich CLA 2011-05-19 16:31:37 EDT
Created attachment 196169 [details]
patch

one line patch for org.eclipse.e4.examples.webintegration.orion.editor.plugin;

Dean, apply this patch to your project. It fixes a problem that causes your browser function to get unregistered when the editor iframe is created.
This fixes the problem of the invisible caret.

Other problem you can see on Linux (and Mac) is that when you enter two new lines and hit backspace once both new lines are deleted. This is caused by a bug in the model, get a new version of model.js to fix this problem.

Done that you should have Linux working.

As for the Mac, there is still the problem of square glyph when arrow keys are pressed, two lines inserted for one enter key stroke, etc. We are still working on that one.
Comment 2 Felipe Heidrich CLA 2011-05-20 12:21:44 EDT
Fixed in HEAD
http://git.eclipse.org/c/e4/org.eclipse.orion.client.git/commit/?id=c0bd850b962d09772070edf6f23172829896e03c

We added code to editor.js to stop processing mac function keys.