rockinthesixstring
24 Oct 2011, 10:52 AM
I'm working on rewriting a V1.1 app into a V2 app, and I've come up against an inconsistency that is kind of annoying.
REQUIRED INFORMATION
Ext version tested:
Sencha Touch 2.0PR1
Browser versions tested against:
Google Chrome (Mac OS X)
Safari (Mac OS X)
DOCTYPE tested against:
<!DOCTYPE html>
Description:
The video describes it best. Please forgive the lack of audio... it's there in my screen recording, but the youtube processing must have lost the sound.
http://www.youtube.com/watch?v=SOthsYz09B8
Steps to reproduce the problem:
use test case below
The result that was expected:
horizontal swipe will lock vertical scroll axis
vertical scrolling will lock horizontal swipe axis
The result that occurs instead:
scrolling and swiping both happen causing a free float of the card
Test Case:
Here's a complete working example.
<!DOCTYPE HTML>
<html>
<head>
<script type="text/javascript" src="http://cdn.sencha.io/touch/sencha-touch-2.0.0-pr1/sencha-touch-all-debug-w-comments.js"></script>
<link rel="stylesheet" type="text/css" href="http://cdn.sencha.io/touch/sencha-touch-2.0.0-pr1/resources/css/sencha-touch.css" />
<style>
.rpc-outerPanelWrapper{
padding: 5px;
}
</style>
<script type="text/javascript">
Ext.Loader.setConfig({ enabled: true });
// Initialize App
Ext.application({
name: 'rpc',
appFolder: 'app',
controllers: ['bible'], //note: define controllers here
launch: function () {
console.log('Ext.application ~ launch'),
Ext.create('Ext.TabPanel', {
fullscreen: true,
tabBarPosition: 'bottom',
items: [{
title: 'Bible Reading',
iconCls: 'bookmark',
xtype: 'bible-indexView'
}]
});
},
initialize: function() {
console.log('Ext.application ~ initialize');
this.callParent();
}
});
// Chapter a day Partial View
Ext.define('rpc.view.bible._chapterADayView', {
extend: 'Ext.Panel',
alias: 'widget.bible-_chapterADayView',
config: {
scrollable: true,
items: [{
xtype: 'container',
cls: 'rpc-outerPanelWrapper',
items: [{
html: '<div class="x-icon-swipe x-icon-swipe-left"></div><i>Swipe for Bible in a Year</i>'
}]
}]
},
initialize: function() {
console.log('rpc.view.bible._chapterADayView ~ initialize');
this.callParent();
}
});
// In a year partial view
Ext.define('rpc.view.bible._bibleInAYearView', {
extend: 'Ext.Panel',
alias: 'widget.bible-_bibleInAYearView',
config: {
scrollable: true,
items: [{
xtype: 'panel',
cls: 'rpc-outerPanelWrapper',
items: [{
html: '<span style="float:right;"><i>Swipe for Chapter a Day</i><div class="x-icon-swipe x-icon-swipe-right"></div></span>'
}]
}]
},
initialize: function() {
console.log('rpc.view.bible._bibleInAYearView ~ initialize');
this.callParent();
}
});
// Index View
Ext.define('rpc.view.bible.indexView', {
extend: 'Ext.Carousel',
alias: 'widget.bible-indexView',
config: {
items: [{
xtype: 'toolbar',
title: 'Bible Reading Plan',
docked: 'top'
}, {
xtype: 'bible-_chapterADayView'
}, {
xtype: 'bible-_bibleInAYearView'
}]
},
initialize: function() {
console.log('rpc.view.bible.indexView ~ initialize');
this.callParent();
}
});
// Bible Controller
Ext.define('rpc.controller.bible', {
extend: 'Ext.app.Controller',
views: ['bible.indexView'],
init: function () {
console.log('rpc.controller.bible ~ init');
}
});
</script>
</head>
<body>
</body>
</html>
Does anyone know of a fix or a workaround for this?
REQUIRED INFORMATION
Ext version tested:
Sencha Touch 2.0PR1
Browser versions tested against:
Google Chrome (Mac OS X)
Safari (Mac OS X)
DOCTYPE tested against:
<!DOCTYPE html>
Description:
The video describes it best. Please forgive the lack of audio... it's there in my screen recording, but the youtube processing must have lost the sound.
http://www.youtube.com/watch?v=SOthsYz09B8
Steps to reproduce the problem:
use test case below
The result that was expected:
horizontal swipe will lock vertical scroll axis
vertical scrolling will lock horizontal swipe axis
The result that occurs instead:
scrolling and swiping both happen causing a free float of the card
Test Case:
Here's a complete working example.
<!DOCTYPE HTML>
<html>
<head>
<script type="text/javascript" src="http://cdn.sencha.io/touch/sencha-touch-2.0.0-pr1/sencha-touch-all-debug-w-comments.js"></script>
<link rel="stylesheet" type="text/css" href="http://cdn.sencha.io/touch/sencha-touch-2.0.0-pr1/resources/css/sencha-touch.css" />
<style>
.rpc-outerPanelWrapper{
padding: 5px;
}
</style>
<script type="text/javascript">
Ext.Loader.setConfig({ enabled: true });
// Initialize App
Ext.application({
name: 'rpc',
appFolder: 'app',
controllers: ['bible'], //note: define controllers here
launch: function () {
console.log('Ext.application ~ launch'),
Ext.create('Ext.TabPanel', {
fullscreen: true,
tabBarPosition: 'bottom',
items: [{
title: 'Bible Reading',
iconCls: 'bookmark',
xtype: 'bible-indexView'
}]
});
},
initialize: function() {
console.log('Ext.application ~ initialize');
this.callParent();
}
});
// Chapter a day Partial View
Ext.define('rpc.view.bible._chapterADayView', {
extend: 'Ext.Panel',
alias: 'widget.bible-_chapterADayView',
config: {
scrollable: true,
items: [{
xtype: 'container',
cls: 'rpc-outerPanelWrapper',
items: [{
html: '<div class="x-icon-swipe x-icon-swipe-left"></div><i>Swipe for Bible in a Year</i>'
}]
}]
},
initialize: function() {
console.log('rpc.view.bible._chapterADayView ~ initialize');
this.callParent();
}
});
// In a year partial view
Ext.define('rpc.view.bible._bibleInAYearView', {
extend: 'Ext.Panel',
alias: 'widget.bible-_bibleInAYearView',
config: {
scrollable: true,
items: [{
xtype: 'panel',
cls: 'rpc-outerPanelWrapper',
items: [{
html: '<span style="float:right;"><i>Swipe for Chapter a Day</i><div class="x-icon-swipe x-icon-swipe-right"></div></span>'
}]
}]
},
initialize: function() {
console.log('rpc.view.bible._bibleInAYearView ~ initialize');
this.callParent();
}
});
// Index View
Ext.define('rpc.view.bible.indexView', {
extend: 'Ext.Carousel',
alias: 'widget.bible-indexView',
config: {
items: [{
xtype: 'toolbar',
title: 'Bible Reading Plan',
docked: 'top'
}, {
xtype: 'bible-_chapterADayView'
}, {
xtype: 'bible-_bibleInAYearView'
}]
},
initialize: function() {
console.log('rpc.view.bible.indexView ~ initialize');
this.callParent();
}
});
// Bible Controller
Ext.define('rpc.controller.bible', {
extend: 'Ext.app.Controller',
views: ['bible.indexView'],
init: function () {
console.log('rpc.controller.bible ~ init');
}
});
</script>
</head>
<body>
</body>
</html>
Does anyone know of a fix or a workaround for this?