Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 268654 - Typo in Java script file leads to JavaScript Evaluation Error
Summary: Typo in Java script file leads to JavaScript Evaluation Error
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: unspecified   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 major (vote)
Target Milestone: 1.2 M7   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-14 23:04 EDT by Stefan Riesen CLA
Modified: 2009-05-12 10:59 EDT (History)
0 users

See Also:


Attachments
Patch to resolve the javascript bug (796 bytes, patch)
2009-03-14 23:04 EDT, Stefan Riesen CLA
ruediger.herrmann: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Riesen CLA 2009-03-14 23:04:13 EDT
Created attachment 128835 [details]
Patch to resolve the javascript bug

Build ID: M20080911-1700

Steps To Reproduce:
1. Have a Browser with enables pop-up-blocker
2. Use ExternalBrowser.open(...) to open a External Page


More information:
The Bug has been found using Safari 4 Beta on OS X with enabled pop-up-blocker.

The javascript part with the typo is:

  open : function( id, url, features ) {
      var win = window.open( url, id, features, true );
      if( win !== null ) {
        win.focus();
        org.eclipse.rwt.widgets.ExternalBrowser._map[ id ] = win; 
      }
    }

Obviously the if line should be win !== null

Funny enough Safari returns on window.open null but evaluates ( win !== null ) as true. Therefore the script fails on win.focus().

Please see the attached patch to fix this issue.
Comment 1 Ivan Furnadjiev CLA 2009-03-23 04:30:06 EDT
Thanks for providing the patch. It is fixed in CVS HEAD.