Strange gray gradient background suddenly showing up on mobile devices

Encountering an issue with a login form displayed on a sliding modal. The design looks correct on desktop and even in responsive mode with dev tools, but when accessed through mobile Chrome or Safari on an iPhone, an unusual gray rounded box or shadow appears.

The layout is styled using tailwind CSS, and the component was constructed with headless UI.

Attempts have been made to rectify the problem by adding -webkit-appearance: none; to the form, yet the unwanted box persists.

Below is how it appears on desktop: desktop view

And this is how it displays on my iPhone: mobile view

Here is the code snippet for the component:

return (
    <Transition.Root show={showModal.open} as={Fragment}>
      <Dialog
        as="div"
        className="fixed inset-0 overflow-hidden"
        onClose={() => setShowModal({ open: false })}
      >
        <!-- Rest of the component code here -->
      </Dialog>
    </Transition.Root>
  );

Answer №1

Encountered a similar situation.

The issue lies in: type="button"

Removing that resolved the problem for me

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

Ways to specify the default value for a component

A sample of my custom component code (Amount.tsx) is shown below: const Price = ({ price, prevPrice }) => { return ( <div className="product-amount"> <div className="price"> {prevPrice ? (<del class ...

The deconstructed state does not get refreshed within the setState callback

Encountering an issue where breaking down a component's state is causing it to not update within setState: state = { value: 'test', values: ['a', 'b', 'c'], }; ... const { value, values } = this.state; ...

Guide on exporting several different 3D scenes using GLTFExporter in react-three-fiber

Currently, I am experimenting with creating multiple 3D models of cubes with varying textures on the faces using react-three-fiber. My goal is to export these models as gltf files. I have been referencing this useful resource on Stack Overflow for guidanc ...

Two problems encountered with the scroll bar feature on a tabular display

Have 2 inquiries about the table displayed below: Question 1: The height of the table is set to 500px, but I am puzzled by the fact that it seems like the content below, which is not part of the table, appears within the table due to the scroll bar exten ...

Having trouble establishing a connection between socket.io and the backend in a React project

I am a beginner and just started learning how to use socket.io. I have set up my backend using express-generator, installed all the necessary dependencies, and the server is running smoothly with no errors. However, I encountered numerous errors when attem ...

React - The prop value remains static even after the parent component updates its related state

My Application consists of two main components: Button and Input https://i.sstatic.net/9cfCu.png Upon clicking the Click to update state button, the input value initially set as May should be updated to May New. However, I noticed that this change is not ...

Utilizing a box within a background image using HTML and CSS

In the midst of my college project, I've encountered a hurdle. There's an image I need to overlay with a box that has padding on all sides corresponding to the outline of the image. Despite my attempts, I haven't been successful in achieving ...

The error "relative error: invalid property value" occurs when setting the width and height of a parent element

I'm having trouble getting my h2 text to appear above my images when hovered over. I keep receiving an error message in Chrome Developer Tools saying that "display: relative" is not a valid property value, but I can't figure out why. I've se ...

encountering an issue following the initial setup using create-next-app

After searching on Stack Overflow and finding no answers, I am posting this question again. When I create a new project in Next.js using npx create-next-app project-name --ts and run npm run dev without making any changes to the source code, I encounter t ...

Increase scrolling speed? - Background abruptly moves after scroll

I'm facing a minor issue. I want to create a parallax background effect similar to what can be seen on nikebetterworld.com. In my initial attempt, I managed to achieve some functionality, but I believe it can be improved. As I scroll, the background p ...

NextJS able to execute code on the client side after being called from the server side

I am currently using getStaticProps to retrieve data from the server at build time and pass it to my page component. The following call is made from my page component file: const getStaticProps: GetStaticProps = async (context) => { const pa ...

What is the secret behind Redactor JS's ability to display properly indented code snippets?

If you take a look at the Redactor JS demo and click on the button to show the HTML source code of the displayed content... ...you will notice that the code is properly indented: Most rich text editors or wysiwyg editors typically display code in a singl ...

What is the best way to send my Array containing Objects to the reducer using dispatch in redux?

I'm currently facing an issue where I can only pass one array item at a time through my dispatch, but I need to pass the entire array of objects. Despite having everything set up with a single array item and being able to map and display the data in t ...

Is the contact form confirmation message displaying too prominently?

I am currently troubleshooting two different forms on a website I'm developing, and I am unsure of the exact cause of the issue. Form 1: Form 2: When attempting to submit Form 1 without entering any information, an error message is displayed exactl ...

Whenever I make changes to a record in the MERN stack, the object ends up getting deleted

Every time I attempt to update a record, instead of updating the objects, they get deleted. Even though my routes seem correct and it's functioning fine in Postman. Routes: router.route('/update/:id').post(function (req, res) { Bet.findByI ...

Accessing targeted information using the identifier in the URL within a React application

Whenever a user clicks on the "Read More" button, it should open a new page displaying more detailed data. This component is showcased on the homepage, and upon clicking the "Read More" button, it redirects to a new page with an expanded view of the compo ...

Creating a custom image component in React that is capable of rendering multiple images

Apologies for my poor English, as I am fairly new to React (just started learning yesterday). I am interested in learning how to render a variable number of images. For example, if I specify the number of images with an array containing file names, I want ...

JavaScript progress bar with extended duration, inspired by the success-oriented approach

Currently, I am in search of a unique solution or plugin that can replicate the same effect as Kickstarter's crowd fund long term progression bar. It seems like existing solutions only offer short term dynamic progress bars that indicate the percentag ...

acquiring information from graphql api within a nextjs application

Whenever I attempt to query data from a GraphQL endpoint, I encounter the following error message: ApolloError: Unexpected token < in JSON at position 0 import { ApolloClient, InMemoryCache } from "@apollo/client"; const client = new Apoll ...

A guide to integrating gatsby-remark-images-grid in markdown with Gatsby.js

Currently, I am working on creating a blog using Gatsby.js with markdown and I want to incorporate CSS grid into my blog posts to showcase a beautiful grid layout of images. I am aware that Gatsby offers incredible plugins to address various challenges. ...