点击事件不会触发iOS中的键盘

时间:2014-02-04 15:01:57

标签: javascript jquery ios events

我需要一些帮助来关注iOS中的输入字段。触发点击事件时,我的iPhone上的键盘不会弹出。

render: function() {

        //set title events
        this.$el.find('.set-title-input input').on('click', this.focusSetTitle);
        this.$el.find('.set-title-input input').on('touchstart', this.focusSetTitle);
        this.$el.find('.set-title-input input').on('blur', this.setTitle);
        this.$el.find('.set-title-input input').on('keypress', this.onEnterSetTitle);
    },


focusSetTitle: function() {
        this.$el.find('.set-title-input input').val('');
        this.$el.find('.set-title-input input').focus();
        this.$el.find('.set-title-input input').addClass('input-active');
        window.blinkingInputBoolean = true;
        $('.set-title-input input').fadeTo( 0, 1);
    },


onEnterSetTitle: function(ev) {
        if (ev.keyCode === 13) {
            this.$el.find('.set-title-input input').trigger('blur');
            this.$el.next().find('.set-title-input input').trigger("click");
            this.$el.next().find('.set-title-input input').trigger("touchstart");
        }
    },

0 个答案:

没有答案