incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rob Van Wicklen (JIRA)" <>
Subject [jira] [Commented] (CB-1247) An option similar to "webviewbounce" is needed that works on Windows Phone
Date Mon, 27 Aug 2012 18:43:09 GMT


Rob Van Wicklen commented on CB-1247:

Hi Jesse. I'm able to reproduce the problem using the helloworld example app that comes with
the LimeJS framework. Links and code are below. If you run this app on a Windows Phone, you'll
find that if you repeatedly drag your finger quickly from top to bottom or from left to right
on an empty area of the screen, you'll see the web view bounce effect more times than not.
The behavior is specific to Windows Phone.

app download link:
LimeJS framework used to build the app:

Here's the source code for the app. This is just the example app code generated by LimeJS,
with 2 modifications. The first modification was to take your suggestion and add event handlers
designed to prevent the webview bounce effect. The second modification was to add a background
color, making it easy to see when the canvas is bouncing.

//set main namespace

//get requirements

// entrypoint
helloworld.start = function(){

	var director = new lime.Director(document.body,1024,768),
	    scene = new lime.Scene(),

	    target = new lime.Layer().setPosition(512,384),
        circle = new lime.Circle().setSize(150,150).setFill(255,150,0),
        lbl = new lime.Label().setSize(160,50).setFontSize(30).setText('TOUCH ME!'),
        title = new lime.Label().setSize(800,70).setFontSize(60).setText('Now move me around!')

    //add circle and label to target object

    //add target and title to the scene


    //add some interaction,['mousedown','touchstart'],function(e){

        target.runAction(new lime.animation.Spawn(
            new lime.animation.FadeTo(.5).setDuration(.2),
            new lime.animation.ScaleTo(1.5).setDuration(.8)

        title.runAction(new lime.animation.FadeTo(1));

        //let target follow the mouse/finger

        //listen for end event
            target.runAction(new lime.animation.Spawn(
                new lime.animation.FadeTo(1),
                new lime.animation.ScaleTo(1),
                new lime.animation.MoveTo(512,384)

            title.runAction(new lime.animation.FadeTo(0));


    // modification 1: add event handlers
    document.addEventListener('mousemove', function(e){e.preventDefault();});
    document.addEventListener('touchmove', function(e){e.preventDefault();});

    // modification 2: set background color = '#00CCCC';
	// set current scene active


//this is required for outside access after code is compiled in ADVANCED_COMPILATIONS mode
goog.exportSymbol('helloworld.start', helloworld.start);

> An option similar to "webviewbounce" is needed that works on Windows Phone
> --------------------------------------------------------------------------
>                 Key: CB-1247
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: WP7
>    Affects Versions: 2.0.0
>         Environment: Windows Phone
>            Reporter: Rob Van Wicklen
>            Assignee: Jesse MacFadyen
>             Fix For: 2.1.0
> A "webviewbounce" option can be set to fix an app's viewable area in place on the iOS
screen, making it so that users cannot drag it and move it off the side of the screen. A similar
setting is needed for Windows Phone.
> Currently, even if the viewport size is set to the device screen dimensions and the scale
is fixed at 1.0, Windows Phone users can still drag the app's viewport which results in a
bounce effect similar to what's seen on iOS when the webviewbounce option isn't set to false.
> The Windows Phone WebBrowser control doesn't directly expose a property that lets you
eliminate the bounce, but the desired result can be acheived with a small amount of wrapper
code around the control. This would need to be implemented within Cordova. The following article
explains how to do it:
> Justification: the ability to eliminate the bounce effect is important for app developers
who want to create an experience that's similar to a native app. This is not currently possible
on Windows Phone.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message