Using Phonegap alongside ons-scroller and ons-button

Recently, I have been using Phonegap with the Onsen UI system on iOS devices. I encountered an issue where buttons included within an ons-scroller were not clickable when running on an iPad or iPhone. Here is the code snippet that caused the problem:

<ons-template id="test.html" style="display:none;">
    <ons-page>
      <ons-toolbar style="background-color:#FF9500;">
        <div class="left"><ons-back-button>Back</ons-back-button></div>
        <div class="center">Main AK</div>
      </ons-toolbar>
        <div class="center">
             <ons-scroller>

               <ons-button modifier="food_folder" onclick="">Type A</ons-button>
               <button class="button button--cta" style=" width:100px; z-index:1000;"  >Test</button> -->

            </ons-scroller>
      </div> 

        <ons-tabbar>
            <ons-button icon="ion-ios-checkmark" modifier="navi_button" onclick="">SAVE</ons-button>
            <ons-button icon="ion-ios-checkmark" modifier="chk_button" onclick="">
                <div><span class="notification">1</span></div>
            Latte
            </ons-button>
        </ons-tabbar>
    </ons-page>
</ons-template>

The buttons worked fine in the browser, but on iOS devices, they were unresponsive due to overlapping layers. Removing the ons-scroller fixed the issue, but I needed a solution for scrollable content on iPhones with multiple buttons.

Has anyone else experienced this problem and found a solution? Thank you.

Answer №1

After some experimentation, I managed to find a solution to the problem at hand. Although I'm not entirely certain if this is the most conventional approach, it worked for me. Firstly, I rearranged the placement of the <ons-tabbar> element following the <ons-toolbar>. Only then did I initiate the <ons-scroller>. Next, I made adjustments to the CSS for the <ons-tabbar>, specifically removing the z-index:2 property, which resolved the issue at hand. If anyone has an alternative method for addressing this problem, please share your insights here. Many thanks.

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

Determining the repetition and placement of background images when employing multiple backgrounds

Is it possible to apply two background images to the same div? I want one image to repeat along the x-axis and the other to appear only once. I've tried using multiple background images, but I'm not sure how to target specific rules for each bac ...

Using jQuery, retrieve the "select" element within a specific row of a

I am working on a table row that has the following HTML structure: When the user interacts with the "Name" field, I trigger the "select" event and pass it to the nameDropChanged function. Once I have a reference to this select element, I need to change th ...

How can I implement a selection (or radio) list in a Table view using Xcode for iOS development

Seeking guidance on designing an iPad interface with a table view in Xcode. Specifically, looking to create a selection (or radio) list within the table view to enable multiple cell selections at once, similar to a checkbox feature. Any tips or resources ...

Effortless method for distributing NPM-loaded modules among various Browserify or Webpack bundles

Feeling frustrated trying to find a straightforward way to share code, required via NPM, across multiple Browserify or Webpack bundles. Is there a concept of a file "bridge" that can help? I'm not concerned about compile time (I know about watchify), ...

When using the * selector in jQuery on Chrome, it targets and selects scrollbars

Here's the code I'm currently using: $("*").bind("mousedown.sg", { 'self':this }, this.sgMousedown); This code binds an event listener to all elements on the page, and it functions properly in most browsers except for Chrome. In Chrom ...

The issue arises with getInitialProps as it fails to pass data to the page component while attempting to retrieve initial information and subsequently modify it using a button

I am currently working on a component located at app\page.tsx in Next.js v13.4.12, and it includes a button. My goal is to have the button trigger the handleClick function when clicked. The issue I'm facing is that the getInitialProps function ...

Having issues with the right margin in HTML5 canvas and struggling to remove the scroll bar

I am struggling with adjusting the margins of my canvas to ensure equal spacing on both sides without any horizontal scroll bars. Desired Outcome: Equal margin on both sides of canvas without any horizontal scroll bars. Issue: The margin-right property i ...

Is there a way to incorporate an external JavaScript file into a .ts file without the need for conversion?

I have an external JavaScript file that I need to utilize in a .ts file without performing any conversion. Does anyone know how to use it within TypeScript without the need for conversion? ...

Is it possible to load multiple angular applications within a master angular shell application?

I am searching for a method to integrate multiple Angular applications into a single shell Angular application. The concept involves having different teams develop separate Angular apps that can be loaded within a main shell app visible to end users. Thi ...

Using jQuery to Activate Genuine Events

Is it true that jQuery's trigger() only executes event handlers bound with jQuery? I have some modules that utilize native browser event binding. Although the solution from works for me, I'm curious if there is a built-in way in jQuery to handle ...

Seeking a breakdown of fundamental Typescript/Javascript and RxJs code

Trying to make sense of rxjs has been a challenge for me, especially when looking at these specific lines of code: const dispatcher = fn => (...args) => appState.next(fn(...args)); const actionX = dispatcher(data =>({type: 'X', data})); ...

Retrieve TypeScript object after successful login with Firebase

I'm struggling with the code snippet below: login = (email: string, senha: string): { nome: string, genero: string, foto: string;} => { this.fireAuth.signInWithEmailAndPassword(email, senha).then(res => { firebase.database().ref(&ap ...

Tips for invoking or triggering the Ajax change function when there is only a single option available

<select class="custom-select custom-select-sm mb-3" required="true" id="sel_block"> <option value="0">Select Block From Here</option> <?php // Fetch Blocks $sql_block = "SELECT * FROM blocks WHER ...

Tips on adjusting font color without activating the :visited state

Currently, I have set up the following HTML and CSS: <div id = "navi"> <ul> <li><a id = "topLinks" class = "currentPage" href = "index.html"> Home </a></li> <li><a id ...

Using JavaScript to extract variables from parsed JSON data

Could someone please help me understand how to run this code smoothly without encountering any errors? var test = 'Something'; JSON.parse('{"xxx": test}'); I am inquiring about this because I have a JSON object containing variables th ...

How can I eliminate the outline from the modal backdrop using Material UI styling shown in the image provided?

https://i.stack.imgur.com/cBCzd.png After attempting to remove the border and box shadow, I am still encountering issues with lines appearing only when clicking on the modal body. The modal styling code has been omitted as it primarily includes flex styli ...

Undefined data is frequently encountered when working with Node.js, Express, and Mongoose

Having a beginner's issue: I'm attempting to use the "cover" property to delete a file associated with that collection, but the problem is that it keeps showing up as "undefined". Has anyone else encountered this problem before? Thank you in adv ...

Angular 6 provides a regular expression that specifically targets the removal of any characters that are not numbers and enforces the allowance of

I have tried various solutions to restrict input in an Angular material input box, but none seem to be effective for my specific case. I need the input field to only allow numbers and a decimal point. Any other characters should be automatically removed as ...

"The Concept of Abstraction in the World of Swift and iOS Development

In my approach to implementing abstraction in iOS, I have come up with the following method: protocol ParentClass: class { func doSomething() func doSomething1() } class ChildClassA: ParentClass { func doSomething() -> Bool { } func doSomet ...

JavaScript Calculator experiencing difficulty with adding two numbers together

I've been working on developing a calculator using HTML and JavaScript, but I'm facing an issue when trying to add two numbers together. Strangely enough, when attempting to calculate 1 + 0, I get the result of 512, and for 1 + 1, it returns 1024 ...