【问题标题】:jQuery Mobile iScrollView errorjQuery Mobile iScrollView 错误
【发布时间】:2013-05-16 10:58:10
【问题描述】:

我同时使用 jQuery Mobile 和 iScrollview, 我用iscrollView

滚动工作正常。

问题一:

当我单击输入文本/密码字段时,我得到一个与整个元素重叠的额外框,该框与输入内容相同。 发现同样的问题

here no solution

问题 2:

当导航到下一页时,前一页会留在新页之后,当点击移动屏幕时,前一页会从设备上消失。这在网络浏览器中没有发生。 任何建议,

main.js 的代码

 require.config({
    paths: {
        jquery: '../lib/jquery',
        'jquery.mobile-config': 'helper/jqm-config',
        'jquery.mobile': '../lib/jquery.mobile-1.2.1.min',
        underscore: '../lib/underscore-min',
        backbone: '../lib/backbone-min',
        templates: '../templates',
        text: 'helper/text',
        config: 'helper/config',
        'backbone.subroute': '../lib/backbone.subroute',
        'cookie': '../lib/jquery.cookie',
         'maskInput': '../lib/Jquerymaskinput',
        'iscroll': '../lib/iscroll',
        'iscrollview': '../lib/jquery.mobile.iscrollview',
            }
    ,
    shim: {
        'underscore': {
            exports: "_"
        },
        'backbone': {
            //These script dependencies should be loaded before loading
            //backbone.js
            deps: ['jquery', 'underscore'],
            //Once loaded, use the global 'Backbone' as the
            //module value.
            exports: 'Backbone'
        },
        'jquery.mobile-config': ['jquery'],
        'jquery.mobile': ['jquery', 'jquery.mobile-config'],
        'backbone.subroute': ['jquery', 'underscore', 'backbone'],
        //'backbone.oauth':['jquery','underscore','backbone'],
        'iscroll': {
            deps: ['jquery.mobile']
        },
        'iscrollview': {
            deps: ['iscroll']
        },
        'config': {
            exports: 'Config'
        }

    }

});
requirejs(['jquery', 'iscroll', 'jquery.mobile', 'iscrollview'], function($, iScroll) {
    var elements = jQuery(document).find(":jqmData(iscroll)");
    elements.iscrollview();
    
});

require([
    'app'

], function(App) {
    App.initialize();
});

用于路由器

define([
    'jquery',
    'underscore',
    'backbone',
    'backbone.subroute'
], function($, _, Backbone) {
    var AppRouter = Backbone.Router.extend({
        routes: {
            // general routes 
            '': 'defaultAction',
            'login':'login',               
            'menu': 'mainMenu',        
           
            // Default
            '*actions': 'defaultAction'       
        }
    });
  
    var initialize = function() {

            $('.back').live('click', function(event) {
                event.preventDefault();
                window.history.back();
                return false;
            });

        var app_router = new AppRouter;       
        app_router.on('route:defaultAction', function(actions) {
            require(['views/home/register'], function(RegisterView) {
                // We have no matching route, lets display the home page 
                console.log('At defaultAction');
            var registerView = new RegisterView();
            registerView.render();
               /// this.changePage(loginView, 'slide');
            });
        });          
         app_router.on('route:login', function(actions) {
            require(['views/home/login'], function(LoginView) {
                // We have no matching route, lets display the home page 
                console.log('At defaultAction');
            var loginView = new LoginView();
            loginView.render();
               /// this.changePage(loginView, 'slide');
            });
        });
        app_router.on('route:mainMenu', function(actions) {
            require(['views/home/menu'], function(MainMenuView) {
                console.log('At mainMenu::router');
            var mainMenuView = new MainMenuView();
            mainMenuView.render();
              //  this.changePage(mainMenuView, 'slide');
    });
        });

        Backbone.history.start();
    };
    return {
        initialize: initialize
    };
});

【问题讨论】:

  • 这对github.com/cubiq/iscroll/issues/119有什么帮助吗??
  • 使用输入 { -webkit-user-modify: read-write-plaintext-only; } 但不工作。??
  • 该链接有更多解决方案。你试过了吗?
  • 类似问题stackoverflow.com/questions/5347078/… 但如果我使用输入{ -webkit-user-modify: read-write-plaintext-only; } 键盘不响:-(
  • 这些问题发生在哪个浏览器/手机上?是否使用自定义 CSS?你能发布一些代码吗?

标签: performance cordova jquery-mobile backbone.js iscrollview


【解决方案1】:

我重写了代码,但它或多或少地解决了我的问题,将 jqm 更新为 1.3,将 jquery 更新为 1.9。 重写所有css文件。 导航到下一页很好 至少它现在可以工作了。

感谢帮助我的奥马尔。

亲爱的朋友

【讨论】:

猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-04-05
  • 1970-01-01
  • 1970-01-01
  • 2012-06-16
  • 2012-11-04
相关资源
最近更新 更多