question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Focus blocked inside slider

See original GitHub issue

Hello, I found out that jquery focus and blur functions doesnt work inside slick.js slider

JsFiddle : http://jsfiddle.net/zuvedht3/1/

====================================================================

Steps to reproduce the problem

  1. Create slick working instance
  2. Add inside input
  3. Try to use focus on input
$(document).on("focus", "input", function() {
  console.log("focus")
});

Its simple action but I cannot make input react on focus and blur

====================================================================

What is the expected behaviour?

Make focus and blur working 😃

====================================================================

What is observed behaviour?

function doesn’t work, for compare there is input outside initialized slick slider in example and the same function with delegation on input with focus works

====================================================================

More Details

  • Which browsers/versions does it happen on? Every Each browser
  • Which jQuery/Slick version are you using? Slick 1.6.0 , jQuery edge same as in your example
  • Did this work before? Didn’t check it before

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:5
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
dariodevcommented, Nov 15, 2017

Agree. Annoying. It’s because of focusHandler function which handles pauseOnFocus. As a quick solution I disabled this function by removing line event.stopImmediatePropagation(); around L1021, as I don’t use pause on focus. @kenwheeler could you add a setting to disable this behavior? In my example I’m using a form inside slider and I need focus and blur.

0reactions
davemacaulaycommented, Mar 20, 2018

event.stopImmediatePropagation(); is used within the focusHandler to ensure if any child element takes the focus that the parent slider will still remain focussed, rather than the child item taking the focus. Working on a fix now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What are possible reasons for not seeing an image?
Image not in focus. Quite often the picture is simply not in focus. · Wrong focus plane · Slide not centered · Objective...
Read more >
Focus/unfocus an input on range slider handler's use
I have a form where the inputs values are controlled by range sliders. There's a calculation every time there's a new entry on...
Read more >
Fixed or focus Slider item in the middle and offset the last and ...
I've been trying to figure out how I can position or fixed the slider item in the middle. Something like the design shown...
Read more >
Focus point | WordPress.org
The topic 'Focus point' is closed to new replies. WordPress Slider Block Gutenslider · Support Threads · Active Topics · Unresolved Topics ·...
Read more >
JS sliders and the Tab key - Grumpy Blog
To adress the problem, we need to capture the focus events occuring inside of the slides. We then need to switch the slide...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found