Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7991229
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T13:14:00+00:00 2026-06-04T13:14:00+00:00

I need to allow some website previews inside sencha touch. I see two different

  • 0

I need to allow some website previews inside sencha touch. I see two different possibilities:

  1. opening safariMobile-app to show the link
  2. generating a panel with an iFrame inside the ‘html’-property.

because I don’t know how to achieve 1. I started with 2. but run into some trouble:

a) the content of my iFrameis not scrollable. if I try to scroll the content, the whole viewport scrolls, including my bottom-tabPanel-Buttons!

b) the displayed website seems to load without any css or images

here is my previewPanel-code:

app.views.WebsitePreview = Ext.extend(Ext.Panel, {
    layout: 'card',
    scroll: 'vertical',
    styleHtmlContent: true,
    fullscreen: true,

    initComponent: function(){      
        this.html = '<iframe width="100%" height="100%" src="'+ this.theLink + '"></iframe>',
        var toolbarBase = {
            xtype: 'toolbar',
            title: 'Vorschau ' //+ this.childData.childUsername,
        };


        if (this.prevCard !== undefined) {
                toolbarBase.items = [
                {
                    xtype: 'button',
                        ui: 'back',
                    text: 'zurück', //this.prevCard.title,
                    scope: this,
                    handler: function(){
                        this.baseScope.setActiveItem(this.prevCard, { type: 'slide', reverse: true });
                    }
                }
            ]
       };

        this.dockedItems = toolbarBase;
        app.views.WebsitePreview.superclass.initComponent.call(this);
    }
});

Ext.reg('websitepreview', app.views.WebsitePreview);

thnx for your help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T13:14:02+00:00Added an answer on June 4, 2026 at 1:14 pm

    I spent two days fighting with the same problem. It seems that finally I found a solution.

    The first thing you should try is to use new built-in feature introduced in iOS 5.

    -webkit-overflow-scrolling:touch;
    

    You need to wrap your iframe with div, something like:

    ...
    this.html = '<div style="-webkit-overflow-scrolling:touch; height: 500px; overflow: auto;"><iframe .../></div>'
    ...
    

    If it doesn’t work (in my case it worked only first time) then you can try to handle touch events by yourself. Let’s say you have the following structure in html:

    <div id="wrapper">
        <iframe id="my-iframe" .../>
    </div>
    

    to make iframe scrollable you need to add this JS

    var startY = 0;
    var startX = 0;
    var ifrDocument = document.getElementById("my-iframe").contentWindow.document;
    ifrDocument.addEventListener('touchstart', function (event) {
        window.scrollTo(0, 1);
        startY = event.targetTouches[0].pageY;
        startX = event.targetTouches[0].pageX;
    });
    ifrDocument.addEventListener('touchmove', function (event) {
        event.preventDefault();
        var posy = event.targetTouches[0].pageY;
        var h = document.getElementById("wrapper");
        var sty = h.scrollTop;
    
        var posx = event.targetTouches[0].pageX;
        var stx = h.scrollLeft;
        h.scrollTop = sty - (posy - startY);
        h.scrollLeft = stx - (posx - startX);
        startY = posy;
        startX = posx;
    });
    

    Source of the second solution is here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For my website, i'm using a flash app to allow some stuff that php
I am in the process of internationalizing a website, and I need to allow
I am currently using the following code on a website to allow some div's
i need to add some functionality to an asp.net application that allows the positioning
I need to wrap a List<T> with some class that allows calls to set/get
I need to allow users to upload PDF documents that other users will read.
I need to allow users to select an assembly in much the same way
I need to allow a consultant to connect to SSIS on a SQL Server
I need to allow multiple Products to be present in a Cart. I do
I need to allow multiple downloading of small documents in Rails, preferably using Paperclip

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.