Zurb Foundation 5 - creating adaptable tables and interactive dropdown buttons

Having trouble with using a dropdown or split drop-down button in a TD cell within Zurb Foundation responsive tables:

Tested on different devices:

  • HTML on browser (works as expected)
  • iPad (works as expected)
  • iPhone (dropdown hides within TD element and is not clickable)

Here is the code snippet causing the issue:

<td class="text-center">
   <a href="#" class="tiny round button split">Actions<span data-dropdown="drop"></span></a><br>
     <ul id="drop" data-dropdown-content class="f-dropdown">
       <li><%= link_to show_image, cancellation %></li>
       <li><%= link_to edit_image, edit_cancellation_path(cancellation) %></li>
       <li><%= link_to delete_image, cancellation, method: :delete, data: { confirm: 'Are you sure?' } %></li>
     </ul>
   </td>

View the responsive table format Crafty Responsive Tables Playground

Any ideas for resolving this issue?

Looking to integrate default actions (show/edit/delete) typically found in Rails tables into a dropdown button.

Answer №1

Although this question is a bit dated, I recently encountered the same issue with dropdown buttons not functioning properly on iPads of any generation.

After conducting some research, I stumbled upon a helpful solution:

The modification outlined here successfully resolved the iPad drop-down menu problem.

I adjusted the code from

<li class='has-dropdown not-click'>
    <a>Menu dropdown</a>
    <ul class='dropdown'>
          <li><a href='aulas.php'>Aulas</a></li>
          <li><a href='locais.php'>Locais</a></li>
    </ul>
</li>

to

<li class='has-dropdown not-click'>
    <a href='#'>Menu dropdown</a>
    <ul class='dropdown'>
         <li><a href='aulas.php'>Aulas</a></li>
         <li><a href='locais.php'>Locais</a></li>
    </ul>
</li>

In my case, the lack of 'href='#'' was the root cause of the issue.

Answer №2

It seems like the issue might be related to a basic CSS problem. If the dropdown menu is still functional but being hidden behind another element, you can try implementing a CSS rule for the td that increases its z-index.

If the parent element of the dropdown has a specific z-index assigned, this approach may not be effective. In that case, consider using CSS to eliminate any existing z-index rules.

Check out developer.mozilla.org/en-US/docs/Web/CSS/z-index for more information.

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

What is the best way to select multiple items using mongoose?

For instance, consider this list: [ { name: "John" }, { name: "Mike" }, { name: "Homer" }, { name: "Bart" }, { name: "Dmitry" }, { name: "Dan" } ] If I want to select specific objects ...

Exploring R object characteristics with JavaScript - Continued!

Previously, I shared a question with similarities (Retrieving R object attributes in JavaScript). Unfortunately, the answer received did not directly address my real problem due to an oversimplified example. Here, I am exploring the need to retrieve R obje ...

Storing and updating object property values dynamically within a for...in loop in JavaScript

I am currently working on a Node application powered by express and I am looking to properly handle apostrophes within the incoming request body properties. However, I am not entirely convinced that my current approach is the most efficient solution. expo ...

Tips for center-aligning layouts in Angular Material

I am struggling with the Angular Material flex layout, so I took this directly from the Angular Material website. Based on the documentation for layout container, items are arranged in a row with a max-height of 100% and max-width matching the width of th ...

Having trouble retrieving the props of a React component within a styled.div component

Transitioning from Angular to React, I am still getting the hang of things and encountering an issue with accessing a property of a styled component passed into it. The error message that pops up is: /src/chat/Container.js Line 115:5: 'cssOverride ...

Determine the data type of a property within a JavaScript object

I am currently working with a javascript object that looks like this: venue = { id: 0, name: '', venueimage_set: [ { imageurl: '', }, ]... At a later point in my code, I need to modify the object ...

When using tinymce, remember to paste the HTML tag <poll poll-id="'POLL ID'"> in

Every time I attempt to paste in the code editor, it cuts off my tag. The editor simply won't allow it... I'm at a loss, I've exhausted all options. Is there anyone who can assist me? <div class="polls form" id="poll-container" ng-app=" ...

Can you identify the issue in this code?

I am facing an issue with using this code to save values in a table when the page loads. The function that searches for values is written in PHP, and I need to use these values in my script. Unfortunately, the current approach I am trying doesn’t seem ...

How can I leverage a public API in Angular 6 to create a custom database for my application?

Currently, I am developing an Angular 6 project and I have a query regarding the possibility of obtaining data from both a public API and an in-memory database simultaneously. For example, displaying movies from a public API while also allowing users to ad ...

Filtering data from an array in Vue.js: A step-by-step guide

I am new to Vue and exploring how to display data from an API. Currently, in my code, when a user clicks on a category, the name of that category is saved and the user is redirected to a page called category.vue. My challenge now is to only display questio ...

Can I apply a different color to every row in an HTML selector?

My question involves using an HTML selector that allows the user to choose a color. <select name="color" class="form-control"> <option value="ff0000">Red</option> <option value="ff7f00">Orange</option> <option value= ...

Python: The simple method to select the HTML radio box

I have minimal experience with Python and I need to determine whether the radio button is selected. Below is my HTML code snippet. <input type="radio" name="radio1" value="1" checked> <input type="radio" name="radio2" value="2"> <input t ...

Fetching data from a database for Vue.js using the Summernote editor

I previously inquired about integrating summernote with vue.js and received a helpful response here. It worked seamlessly with v-model binding. However, I encountered an issue when attempting to load data from the database for an edit page. The data was n ...

VueJS allows for seamless image uploading using either a gallery of images or input files

Is there a way to enable image selection from "Pick from gallery" feature in addition to the file upload functionality demonstrated in the example below? I would like the same behavior for selecting an image from the gallery as when uploading a file using ...

There are no users associated with this profile

My goal is to implement a context processor for displaying a user's profile page. However, when I try to use it, the website returns the message: Profile has no user Here is the context processor I have written: from .models import Profile de ...

Difficulty achieving gradient effect with partial background color change in table-cell

In order to achieve a unique look for this particular design, I am seeking ways to alter the red background color of each cell in varying degrees - such as 100% for the first cell, 100% for the second cell, and 50% for the third cell. Update: After experi ...

Tips for preventing the unmounting of child components while utilizing JSX's map function

This is a condensed version of a question I previously asked. Hopefully, it's clearer and more comprehensible. Here is a simple application with 3 input fields that accept numbers (disregard the ability to enter non-numbers). The app calculates the s ...

The exception is being thrown in RxJs retryWhen before all retry attempts have been made

I have been working on implementing an API call that needs to be retried a few times in case of errors, after a specific time delay, and based on certain conditions such as checking if the success response JSON has any null fields. I came across this helpf ...

I am experiencing an issue where my React component fails to update properly when viewed in Safari

Everything seemed to be going smoothly. Functioning perfectly in Chrome, FF, Edge, and even IE 11! The main component holds all the state. I send the bets object to the child component which calculates a count to pass to the grandchild component for displ ...

What is the best way for my controller to access the appropriate view component in extjs?

In my project, I have defined a Ext.grid.Panel named JobList, which includes an Ext button with the unique identifier myButton. The JobList also has its own controller. Within the controller, I have incorporated the following code: Ext.define('App.co ...