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 8607707
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T03:25:35+00:00 2026-06-12T03:25:35+00:00

I have been making a Phonegap / Cordova 2.0 app with backbone.js which has

  • 0

I have been making a Phonegap / Cordova 2.0 app with backbone.js which has all been fine until I tried to build in a form. The form is displayed but the click events do not trigger the keyboard.

I played around with different events and found that adding ontouchstart="this.focus()" brought up the keyboard fine. I added a catchall in the view function to bring focus:

window.PageView = Backbone.View.extend({

    initialize: function() {
        this.template = _.template(tpl.get('page'));
    },

    render: function(eventName) {
        $(this.el).html(this.template(this.model.toJSON()));
        $('input', $(this.el)).bind('touchstart',function(event) {
            $(this).focus();
        });
        return this;
    }

});

But even with this if I change bind('touchstart'... to 'click' it doesn’t get triggered.

I have found a couple of other posts like: click event doesn't fire in an underscore template

which suggests it is to do with the underscore.js templating process but nothing is very clear.

I guess I could make a timer function on touchstart to simulate this but it’s kindof mysterious so I want to know what’s going on really.

Thanks.

  • 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-12T03:25:37+00:00Added an answer on June 12, 2026 at 3:25 am

    It turns out it was iScroll causing the problem.

                onBeforeScrollStart: function (e) { e.preventDefault(); },
    

    Specifically. I just commented out the e.preventDefault(); and it worked a treat!

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

Sidebar

Related Questions

I have been making a form in html that has a checkbox and if
I have been reading The Business of iPhone and iPad App Development: Making and
I have tried making a fiddle for this, but it's been too difficult to
Until now I have been making my own 1024*1024 sprite sheets by placing the
Good afternoon. I have been making a small openGL based app for android that
So far all the mistakes I've been making have been small things I'm missing,
I have been making a button which (hopefully) looks fairly realistic. One part of
I have been making application in which i click on image and new window
So I have been making a program in Java to organize all my files.
I have been making an iPhone App where I need to identify and decompose

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.