I am unable to slide the button on Safari

Looking to accomplish

Vue.js 2.6.10
ruby 2.6.5
rails 6.0.3

Greetings, wanderer.
I have utilized the Vue library along with vue-slick-carousel to craft the slides.
https://github.com/gs-shop/vue-slick-carousel

However, there seems to be an issue where the button on the slide is clickable in Chrome but not in Safari (it appears hidden upon hovering). Occasionally, repeatedly clicking on it may initiate the action.

Here's a glimpse of the source code below.

I would greatly appreciate if you could shed light on the root cause and potential solution.

Chrome

https://i.sstatic.net/AyYYz.gif

Safari

https://i.sstatic.net/1gTaF.gif

Source code for arrow buttons

https://i.sstatic.net/IU5c3.png

Code

SlickCarouselMixin.vue

<script>
import SlickCarousel from 'vue-slick-carousel'
import 'vue-slick-carousel/dist/vue-slick-carousel.css'
import 'vue-slick-carousel/dist/vue-slick-carousel-theme.css'

export default {

  components: {SlickCarousel},

  data: function () {
    return {
      slickOptions: {
        dots: true,
        arrows: true,
        swipe: false,
        slidesToScroll: 3,
        slidesToShow: 3,
        infinite: false,
        speed: 1000,
      },
    }
  }
}

</script>

<style>
.slick-prev, .slick-next{
  width: 0;
  height: 0;
  position: absolute;
  top: 40%;
}
.slick-prev{
  left: -30px;
}
.slick-next{
  right: 0;
}
.slick-prev:before, .slick-next:before {
  font-family: "Font Awesome 5 Free";
  font-size: 90px;
  color: #c7c7c7;
  line-height: 1;
  text-rendering: auto;
  display: inline-block;
  font-style: normal;
  font-variant: normal;
}
.slick-prev:before {
  content: "‹";
}
.slick-next:before {
  content: "›";
}
.slick-prev.slick-disabled, .slick-next.slick-disabled {
  pointer-events: none;
  opacity: 0;
}
.slick-dots li.slick-active button:before {
  color: #86bc25;
}
.slick-slide > div {
  margin: 0.5rem;
}
.slick-slide li > a {
  padding: 1.25rem;
}
</style>

Show.vue

<template>
  <div>
    <div class="m-3 p-3">
      <SlickCarousel v-bind="slickOptions" class="other-item-list">
        <li v-for="test in tests">
          ・・・
        </li>
      </SlickCarousel>
    </div>
  </div>
</template>

<script>
import SlickCarousel from "../../../common/SlickCarouselMixin"
export default {
  mixins: [SlickCarousel],
・・・

</script>

<style>
.lb-nav a.lb-prev, .lb-nav a.lb-next {
  width: 50%;
}
.fadeIn {
  animation: fadeIn 0.4s;
}
</style>

Answer №1

Implemented the use of absolute positioning for pseudo-elements.

SlickCarouselMixin.vue

.slick-prev:before, .slick-next:before {
  font-family: "Font Awesome 5 Free";
  font-size: 90px;
  color: #c7c7c7;
  line-height: 1;
  text-rendering: auto;
  display: inline-block;
  font-style: normal;
  font-variant: normal;
  position: absolute;
}

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

Are you receiving a response code 500 when making a request to a presigned URL?

I've been encountering an issue with generating presigned URLs for files from my S3 bucket. Although I can successfully read files and obtain a list of file contents, when attempting to create a presigned URL using the following code snippet: reports ...

Employ the parameter within the main object

I currently have this code snippet in my function: add(messenger) { switch (messenger) { case 'skype': this.messengers = _.assign(this.messengers, {skype: ''}) break case 'telegram': this.messenge ...

Issues arise with the functionality of CSS and JavaScript after successfully deploying a Next.js and React project to the server side

I need to deploy my React+Next and Node.js projects on the same port. To achieve this, I converted my TypeScript files to JavaScript and moved the .next folder to the backend side. Now, my API and frontend code are functioning on the same port thanks to Ex ...

Using Vuejs 2 to manage assets

As a beginner in VueJS, I am exploring ways to incorporate an external JavaScript library into my component. After downloading the minified JS file and placing it in my assets directory, I'm unsure how to compile my component to utilize this library ...

IE7 z-index issue with incorrect stacking order

Visit this jsFiddle link. When using IE7, the code in the jsFiddle above shows the dropdown (.sbOptions) positioned beneath the next selectbox element (.sbHolder). Even though .sbOptions has a z-index: 100;, it is still being displayed under .sbHolder. ...

I am consistently encountering the error message: "Error: Unable to locate module './framer'"

I've been running into the same issue repeatedly. I'm in the process of creating a website for a barbershop and I'm attempting to integrate events into a Google calendar using the Google API. I've installed googleapis and framer, but I ...

Initiating the animation/game loop for a three.js object

I am utilizing angularJS and Three.js for the frontend of my project. The Three.js object is created in the following manner: var ThreeObject = (function() { //constructor function ThreeObject() {} ThreeObject.prototype.init = functio init (){ //initial ...

Tips for inserting characters at the cursor in a contenteditable element?

Is there a way to simulate typing a character in either JQuery or plain JavaScript? I am working with a contenteditable section where I need to intercept user input to replace certain characters (such as straight quotes with curly ones). While I have foun ...

JavaScript function not functioning properly with variable input

I'm currently working on implementing two functions that will allow me to navigate through an array of image sources and display them in my image view: nextImage() and previousImage(). Everything seems to work fine when I hardcode the num variable, bu ...

Leverage CAPICOM on the Server-Side

I need to convert my code from .net for signing in client side and verifying in server side to asp classic. In the .net code on the client side, I sign with capicom using JavaScript. Here is an example of my code: <script type="text/javascript"> / ...

JavaScript: capturing all elements triggering an event

Whenever I interact with the monitor of my virtual mobile phone (using Chrome emulation), the event touchmove is triggered. I've tested the following line of code and it works. This confirms that the element ".button" is affected by this event, but h ...

Transform the process of searching for the className JavaScript block to incorporate jQuery

I have a small block that I wanted to convert to using jQuery in order to enhance my skills with the library. The main goal is to reverse engineer how it currently functions. I attempted to make the conversion, but I struggled with some of the changes. Th ...

having trouble with if and else if statements functioning properly

After testing my code, an issue arises with the second else if statement. When both divs are active, only the class of #project-wrapper is removed. I suspect there may be an error in how I wrote the second else if condition. Can you help me spot any mist ...

Having trouble establishing a connection with SignalR on my backend, it just doesn't seem to work properly

I am currently working on a project where I am using Vue with TypeScript and @microsoft/signalr. My goal is to create a chat feature using SignalR, and on the backend, I am utilizing C# with ASP.NET Core and docker. Here is the code snippet I have impleme ...

Tips for creating a responsive Youtube embedded video

Check out this website for a good example: If you take a look, you'll notice that the header youtube video is responsive - it automatically resizes when the window size changes. Here are the <iframe> codes: <iframe id="bluetube-player-1" fr ...

Using the <noscript> tag for an individual element or a comparable alternative

So, I have a link labeled "Impressum" that when clicked, opens up the Impressum section. <a data-open="something">Impressum</a> <div class="reveal" id="something" data-reveal> <img src="images/reverseLogo.png"> <h1>Imp ...

Failing to trigger the event when connected via addEventListener

I'm currently working on developing a function to calculate the number of characters remaining. My aim is to utilize addEventListener to monitor event types: var output = document.getElementById('output'); var tweetTxt = document.getEleme ...

Trouble connecting an event to a dynamically added button using jQuery

I am currently working on a project that involves creating a dynamic walk-through wizard for users. The code I have developed adds an overlay to the page and generates a container with next and previous buttons. By utilizing Ajax, I populate the container ...

Query Strings in a URL

I'm currently experiencing an issue. Within my Node and Express setup, the Index.html file includes 2 input fields. <form action="/profile" method="get"> <input id="variable1" name="variable1" type="text" placeholder="..."> //xxx ...

Guide to converting JSON data into object structures

Question - How do I convert JSON data into objects? You can find the JSON data here Details - After successfully connecting to the API and retrieving the JSON data, I am looking to map two arrays data.hourly.time[] and data.hourly.temperature_2m[] into a ...