Scroller touch strategies not working if application rendered into other target than document.body

Description

If Enyo application is rendered into other location than <body>, the touch Scrolling is not working.

Reproduced on Android (Cordova) and desktop browser (Firefox, Chrom e - Xubuntu 14.10). Enyo 2.5.1
The issue was not present in Enyo 2.4.0.

Test application (myst be tested in embeded result frame):

Tocuh scrolling not working (e.g. Firefox, Chrome)
http://jsfiddle.net/novakmi/mypLpjny/embedded/result/

Change in http://jsfiddle.net/novakmi/mypLpjny/

enyo.kind({
name: "MyApp",
kind: "enyo.Application",
view: "AppView",
//renderTarget: "enyoApp",
});

enyo.ready(function () {
new MyApp({name: "MyApp"}).renderInto(document.body);
})

touch scrolling is working.

http://jsfiddle.net/mypLpjny/19/embedded/result/

Activity

Show:
n
December 14, 2014, 10:23 PM
RoyS
December 15, 2014, 10:43 PM

It appears to be caused by the div not having any explicit sizing. If you add the enyo-document-fit and enyo-body-fit classes you can make the scroller work again. Also, if you give an explicit height to the div, that works, too:

http://jsfiddle.net/enyojs/mypLpjny/22/

RoyS
December 15, 2014, 11:31 PM
Edited

Actually, the issue is a misuse of the FittableRows. The fit: true needs to be applied to one (and only one!) child of the FittableRows, not the FittableRows itself. See this fiddle that works correctly:

http://jsfiddle.net/enyojs/mypLpjny/23/

n
December 16, 2014, 9:02 PM

Thank you for your answer. Actually, the fit:true is taken directly from bootplate example

view.js

Yes, removing fit:true, but breaks other parts of the application, so it looks it has some effect.
I need to create more complex example to describe (will take me some time).

my UI layout is something like:

If I remove fit:true from FittableRows, then all Panels disappears.
Also setting style="width: 100%; height: 500px;" to the div in my application does not help.
As I said, it was working OK in 2.4.0.

I'll try to make working example (as issue is closed, probably open new one). Thanks.

RoyS
December 16, 2014, 9:06 PM

Ah, well, if that is inside another fittable then it is perfectly OK to have a fit: true in there. In the example, there was no fittable outside.

Assignee

Screener (Enyo Team)

Reporter

n

Labels

External issue ID

None

Tango Test Run Elements

None

Old Issue Key

None

Components

Affects versions

Priority

None
Configure