oruga icon indicating copy to clipboard operation
oruga copied to clipboard

Click events are prevented inside carousel components

Open michastubi opened this issue 3 years ago • 1 comments

Overview of the problem

Oruga version: 0.5.5 Vuejs version: 3.2.37 OS/Browser: Firefox, Chrome...

Description

This bug can be seen in the Oruga Documentation itself at the "custom" Example: https://oruga.io/components/carousel.html#custom

Steps to reproduce

  1. Add a input inside a carousel component
  2. Try to focus the input

Expected behavior

The input is focused.

Actual behavior

Nothing happens

Solution

Inside the carousel component there are following lines:

          <div
                @mousedown.prevent="dragStart"
                @touchstart="dragStart"
                :class="itemsClasses"
                :style="'transform:translateX('+translation+'px)'">
                <slot/>
            </div>

By removing prevent from @mousedown the problem is fixed. But I am not sure if this will cause other problems.

Thanks for your great work! Micha

michastubi avatar Aug 10 '22 11:08 michastubi

You might make a PR to fix it checking if there is a reason to maintain prevent, what do you think?

jtommy avatar Aug 10 '22 21:08 jtommy

@michastubi did you investigate about it?

jtommy avatar Aug 26 '22 13:08 jtommy

https://github.com/oruga-ui/oruga/commit/159201e1dfd7f0342585c377e932a97d0b5d04d2

jtommy avatar Sep 26 '22 19:09 jtommy