The close button on the modal vanishes on a real iPhone

The issue I am facing is that the Close Button appears when testing responsiveness in Chrome, but disappears on a real iPhone.

When clicking on an image, the image gallery should appear. However, on an iPhone, only the previous and next buttons are visible while the close button disappears.

Below is the code snippet:

import React, { useState } from "react";
import {
  Box,
  HStack,
  IconButton,
  Image,
  Modal,
  ModalContent,
  ModalOverlay,
  Spacer,
  Text,
  VStack,
} from "@chakra-ui/react";
import ArrowLeftIcon16x8 from "../../icons/ArrowLeftIcon16x8";
import ArrowRightIcon16x8 from "../../icons/ArrowRightIcon16x8";
import { CloseIcon } from "@chakra-ui/icons";

// Component definition omitted for brevity

export default ImageGalleryModal;

I have tried adjusting the zIndex of the close button to be higher than that of the other buttons, but it did not resolve the issue.

Answer №1

To locate the button, look closely for the blue mark in the top right corner of the image. Adjust the top margin of the close button within a media query or increase the top value if it is using "position: absolute".

(https://i.sstatic.net/tCUjf.jpg

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

Tips for arranging images in a horizontal layout using FlatList in React Native

Is there a way to display feed images horizontally instead of vertically in FlatList? I've tried wrapping the images in a view with flex-direction set to row, as well as adding horizontal={true} to the FlatList, but nothing seems to work. Any suggesti ...

Please input the number backwards into the designated text field

In my react-native application, I have a TextInput where I need to enter numbers in a specific order such as 0.00 => 0.01 => 0.12 => 1.23 => 12.34 => 123.45 and so on with each text change. I tried using CSS Direction "rtl" but it didn' ...

Displaying an Array in HTML using Angular

Just starting out with Angular and experimenting with data display from an array. The data in the array is: [Me, Three, Four] I attempted to loop through it for printing but encountered issues. Here's a snippet of how I'm currently handling it: ...

Iterate using jQuery through all child div elements

<div id="SelectedSection" class="selected"> <div class="sec_ch" name="7"> <div class="sec_ch" name="8"> <div class="sec_ch" name="9"> <div class="sec_ch" name="11"> <div class="clear"> </div> </di ...

Could this method of utilizing GET be considered incorrect?

I've been tackling a project and encountered an issue that I was only able to resolve by using the following code snippet: header("Location:messages.php?ID_Conversation=$row[ID]"); Do you think this approach is incorrect? ...

What is the process for integrating Express and React in an application?

Currently delving into my studies on Express using this fantastic book, I find myself immersed in the React chapter. The author has introduced a fascinating little application that stands out, yet seems to exist separately from the Express application I di ...

The animation-play-state is set to 'running', however, it refuses to start playing

I'm in the process of creating a landing page that includes CSS animations, such as fade-ins. Initially setting animation-play-state: "paused" in the CSS file, I later use jQuery to trigger the animation while scrolling through the page. While this s ...

Display issues with modal component preview on Bit.dev

I created a component using bit and exported it to localhost. The preview displayed below. Here is how the component should look The expected behavior was for the component to appear under Compositions. This issue may be related to my use of the Modal i ...

React Next.js failing to trigger useEffect hook on live application

Recently, in my Next.js/React application, some previously functional pages began to exhibit strange behavior. Specifically, certain Axios requests within a useEffect hook are no longer being sent at all. Additional Information: The problematic file is a ...

What is the best way to display link icons - as images or using CSS background-image URLs?

When designing a web UI, I am considering using iconography to represent actions such as adding, editing, deleting, and searching for items. However, I want to ensure that the purpose of each action is clear without displaying text and cluttering the UI sp ...

What could be causing my second ajax call to render the page unresponsive?

I am encountering an issue with my AJAX call. It works fine on the first attempt, but when I try to call it a second time, the page becomes unresponsive. I am not sure what is causing this issue. The code is located within the document ready function. The ...

Utilizing JavaScript to eliminate objects from a collection and showcase a refreshed arrangement

On a simple webpage using bootstrap and js/jquery, data is fetched via ajax to create entries displayed to the viewer. The process involves: - making a request - parsing XML to create an array of objects with all the data - sorting by one property - cr ...

Leveraging useContext with ImmutableJS

My data Object is stored as the context, and I populate it with API responses. However, I suspect there may be performance issues with my current setup. I have looked into ImmutableJS but can't find any information on integrating it with ContextAPI. W ...

The constant remains defined when used with a GET request, but appears as undefined when used with a POST request in the

I am currently working on a React tutorial to create a basic blog in the MERN stack. I'm facing an issue in my Server.js file where I'm trying to make a POST request to MongoDB. The function is supposed to identify the collection and a JSON objec ...

Incorporate a CSS class name with a TypeScript property in Angular version 7

Struggling with something seemingly simple... All I need is for my span tag to take on a class called "store" from a variable in my .ts file: <span [ngClass]="{'flag-icon': true, 'my_property_in_TS': true}"></span> I&apos ...

How can a user be assigned to a button in React in order to block them?

Within my user list, each user is accompanied by a block button. Upon clicking this button, a modal appears to confirm the blocking action for that specific user. Although I have set up the display of the modal, when I click on the confirm button, nothing ...

Finding out the specific row that was clicked in a Jquery Mobile listview

I've searched everywhere and can't find a solution. How can I retrieve the value of a row tapped in a listview? This could be anything from the name to the index within the object. Currently, I have a function handling the tap event. I need to pa ...

Avoid automatic scrolling when moving between tabs with varying lengths in Bootstrap Tabs

I am working with a series of Bootstrap tabs that contain content of various lengths: <ul class="nav nav-tabs" id="myTab" role="tablist"> <li class="nav-item" role="presentation"> <button class="nav-link active" id="home-tab" data ...

I am having difficulty accessing specific data in JSON using Searchkit's RefinementListFilter

Utilizing searchkit for a website, I am encountering issues accessing previously converted data in json format. The structure of my json directory is as follows: (...) hits: 0: _index: content _type: content _source: ...

Having trouble with the react-router-dom Link feature?

I recently made the switch from react-router to react-router-dom and managed to resolve all the issues. However, I am facing a new problem where clicking on the links changes the URL but does not render the respective view. Below is the structure of my ap ...