How to smoothly reveal a popup form in jQuery mobile on an iOS device by scrolling up

A popup containing a form was created using jquery mobile. Below is the code for the form.

 <div data-role="popup" id="popupDetailles" data-theme="a" data-overlay-theme="b" style="width:100%;" data-transition="pop" class="ui-corner-all ui-popup ui-body-c ui-overlay-shadow" data-dismissible="false">
    <a href="#" data-rel="back" data-role="button" data-theme="b" data-icon="delete" data-iconpos="notext" class="ui-btn-right">Close</a>
    <form>
        <div style="padding:0px 5px 0px 5px;">
            <h3 style="text-align: center;" id="header-popup"></h3>
            <hr width="100%" size="2" color="black">

            <h4 style="margin-bottom:0">Type of Workforce <span class="style2" style="color: red">*</span></h4>
               <select name="typeMainOeuvre" data-theme="a" id="typeMainOeuvre" required>
                </select>

            <h4 style="margin-bottom:0">Type of Time</h4>
            <select name="typeTemps" data-theme="a" id="typeTemps">
            </select>

            <div id="div_dureeTS">
                <h4 style="margin-bottom:0">Hours of Work</h4>
                <div align="center">
                    <input name="txtDuree" id="txtDuree" type="text" data-role="datebox" data-options='{"mode":"durationflipbox", "overrideDurationOrder": ["h", "i"], "overrideTimeFormat": 24, "maxDur":85500, "overrideDurationFormat":"%Dl:%DM", "themeButton": "b", "themeInput": "a", "theme": "a", "themeHeader": "a", "hideInput": true, "useInlineBlind":true, "useLang": "fr"}' />
                </div>
            </div>

            <div id="div_dureeTS">
                <h4 style="margin-bottom:0">Start Time of Day</h4>
                <div align="center">
                    <input name="txtDebutJournee" id="txtDebutJournee" type="text" data-role="datebox" data-options='{"mode":"durationflipbox", "overrideDurationOrder": ["h", "i"], "overrideTimeFormat": 24, "maxDur":85500, "overrideDurationFormat":"%Dl:%DM", "themeButton": "b", "themeInput": "a", "theme": "a", "themeHeader": "a", "hideInput": true, "useInlineBlind":true, "useLang": "fr"}' />
                </div>
            </div>


            <h4 style="margin-bottom:0">Parking Fees ($)</h4>
            <input name="frais_stationnement" data-theme="a" id="frais_stationnement" type="number" class="classe-frais_stationnement" min='0' max='9999999' onkeypress="return isNumberKey(event, this.id)"/>

            <h4 style="margin-bottom:0">Kilometers (Km)</h4>

            <input name="Kilometrage" data-theme="a" id="Kilometrage"  type="number" class="classe-Kilometrage" min='0' max='9999999' onkeypress="return isNumberKey(event, this.id)"/>
            <label>
                <input type="checkbox" id="frais_deplacement" name="frais_deplacement"> Include CCQ Travel Expenses (65km and more) 
            </label>

            <h4 style="margin-bottom:0">Comment</h4>
            <textarea name="textarea" data-theme="a" id="txtCommentTimeSheet"></textarea>

            <div align="center">
                <button type="button" data-icon="check" data-position="fixed" data-inline="true" data-theme="b" class="buttonBlue" id="btnSaveHeures">Save</button>
            </div>
        </div>

    </form>
</div>

The submit button works on Android devices but not on iPhones, where it causes the page to jump to the top without submitting the form.

Answer №1

Update your "category" to :

<button type="submit" data-icon="check" data-position="fixed" data-inline="true" data-theme="b" class="btnBlue" id="saveHoursBtn">Save</button>

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Is the CSS for the selected option not functioning properly in Internet Explorer version 10?

$('#inputTest').on('input', function() { $('#helloSellect option').css({ display: "none" }); }) <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <input id="inputTe ...

Increase the spacing between accordion panels on a webforms ASP.NET application

Tech: This webpage is built on an Asp.net Webforms application using a master page and an ajax accordion control. All elements for the page are contained within a designated placeholder. The design of the webpage includes an ajax accordion with multiple A ...

The page is having trouble loading images

My goal is to display sliding images in a web application using Bootstrap carousel. The images are fetched from the backend and stored in the 'images' state. Below is the JSON format of the data that is retrieved: images:[ { SNO:'1', NA ...

Warning: Discord.js issue - please handle promise rejections (node:4976) [DEP0018]

Here is my code snippet along with the error message I'm facing. I need help understanding why this error is occurring and how to fix it. const Discord = require("discord.js"); const client = new Discord.Client(); const DisTube = require(&qu ...

Can validity api provide a means of displaying errors in a list format?

Currently, I'm working on developing a contact form and attempting to utilize the validity API for the first time. Adapting to WCAG2.1 standards has posed some challenges, but I've managed to display errors underneath each field as I code. Howeve ...

Problem encountered while trying to publish a post using Iron Router

I'm encountering some difficulties when trying to create a route that allows me to respond to comments (.../comments/:_id/reply) and publish the related post. Below is the code snippet: Publications Meteor.publish('commentUser', function(c ...

Is it possible to verify the existence of several arrays of data in a MongoDB database using Node.js?

I'm trying to verify if certain data exists in a database. If the data does exist, I want to set the value of k to 1. global.k = 0 let roll = {roll0:"1616",roll1:"234"} for (let i = 0; i < inputcount; i++) { let obj1 = roll["roll" + i]; const ...

Ways to identify when a modal window is being closed in the angular-ui $modal component

I am currently utilizing the $modal from angular-ui to generate a modal window. Below is the code snippet for creating the modal: this.show = function (customModalDefaults, customModalOptions, extraScopeVar) { //Create temporary objects to work with s ...

What's the best way to remove all &#160; siblings from a JSON string using JavaScript?

Is there a way to remove all instances of "&#160;" in a JSON string? { "Cat": "laps&#160;milk", "Dog": "Woofs&#160;at&#160;Postman", "Bird": "Jumps&#160;over&#160;the&#160;river", "I": "Want&#160;to&#160;learn&a ...

Issues with object changes not reflecting in Vue.js 2.0 component rendering

I am facing an issue where my object is not updating immediately after a click event. It appears that a manual refresh or clicking on another element is necessary for the changes to take effect. How can I ensure that the object updates without the need for ...

Activate a click event on a different link inside a div when one is clicked using jQuery

I've been spinning in circles trying to figure out how to make this work, and I'm convinced it's something really simple! On my page, I have divs with several links, and I want clicking on one link in the div to automatically click on anoth ...

Horizontal alignment of navigation bar items using <ul>

I'm trying to center the bar within the navigation bar vertically, but when I use align-items: center for the bar, it only centers the sign-in button, leaving it slightly above the middle position. nav a{ color:white; } nav{ justify-content: sp ...

My Instagram stream using the Ionic framework's infinite-scroll feature is experiencing issues with repeated duplicates in the repeater

I am currently working on developing a mobile app for IOS and Android using the Ionic Framework. The app will feature an Instagram Feed with the Instagram API, displaying all photos shared under a specific hashtag (for example, #chocolat). I am also lookin ...

Issue: Unable to find solutions for all parameters in NoteService: (?)

After following a tutorial on Angular 2 from , I encountered the mentioned error when running my API. The browser indicates that there are unresolved parameters in the following service: import {Injectable} from '@angular/core'; import { ApiSe ...

Steps for adding information to an AngularJS scope

I am facing an issue with setting the data inside the scope once it becomes active. On my HTML page, I have a show/hide menu that displays data when a button is clicked. I need to store this data within the scope correctly. Please advise on any corrections ...

Conceal the nearest parent element above using JavaScript (or jQuery)

I need to implement a functionality where clicking a button hides a specific HTML class. The structure of the HTML is as follows: <thead> <tr class="employee-list"> <th> <button class="show-emp">S ...

Having Trouble with Jquery UI Date Picker?

I have included my form code below. <div class="threeleft second" id='displayallformshow' style="float: none;width: 80%;padding:10px;"> <form action="investor_submit.php"> <div class='formdiv'> ...

Do I need to utilize getStaticProps along with JSON imports in Next.js?

Is it necessary to use getStaticProps in order to render static data from a JSON or typescript file, or can the data be imported without using getStaticProps? The documentation I read didn't provide a clear answer. projects.tsx const projects: [ { ...

Loop through the array while handling a promise internally and ensure completion before proceeding

I am currently working on populating a response array with Firestore snapshots and creating download links for stored files within each snapshot. Despite trying various solutions involving Promises, the response array consistently ended up being null. do ...

Alter the input background color steadily through javascript transformation

Is there a way to gradually fade in a new background color using JavaScript only? I am currently changing the background color with the following code: // html <input onfocus="onFocus(this)" onblur="onFocus(this)" type="text"> // JS function onFoc ...