Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: Tab index #321

Closed
JosefWN opened this issue Oct 23, 2015 · 9 comments
Closed

Suggestion: Tab index #321

JosefWN opened this issue Oct 23, 2015 · 9 comments
Assignees
Labels
Feature request Request for a new functionality
Milestone

Comments

@JosefWN
Copy link

JosefWN commented Oct 23, 2015

It would be nice if the control supported tab index. I tried setting it on the text input but since it's hidden it doesn't work. This is just a minor detail though.

@IonDen
Copy link
Owner

IonDen commented Oct 24, 2015

Good idea. I will check this.

@IonDen IonDen added the Feature request Request for a new functionality label Oct 24, 2015
@IonDen IonDen self-assigned this Oct 24, 2015
@IonDen IonDen added this to the 3.0.0 milestone Jul 7, 2016
@leeish
Copy link

leeish commented Jul 8, 2016

Any chance you could share how I could achieve this with JQuery. I've captured the event when someone tabs to the hidden range input field. But I've tried manually focusing on the .irs-slider, triggering a click on the .irs-slider and other elements and nothing seems to grab the focus and activate the keyboard. What element or event could I trigger to simulate someone activating the keyboard. P.S. love the tool, works great.

@IonDen
Copy link
Owner

IonDen commented Jul 8, 2016

Hi, original input has class irs-hidden-input.
BTW, you may add it you own class, while creating you html-page.

@vesrah
Copy link

vesrah commented Aug 16, 2016

Lee, I achieved adding tab indexes with the following jQuery:
$('.irs-slider.from, .irs-slider.to').each(function() { $(this).attr('tabindex', '0'); });
However, this doesn't actually allow the controls to be manipulated. They must first be clicked before they become active. This is unfortunate.

@ukalpa
Copy link

ukalpa commented May 18, 2017

Hi there,

I figured out a solution as below makes keyboard operation active straightway when the input is focused by pressing tab:

  1. Set tabindex for "span.irs-line" and set "keyboard" as true

     $("input[name=test]").ionRangeSlider({
         type:"single",
         keyboard: true,
         grid:true
     }).parent().find("span.irs-line").attr("tabindex", "1");`
    
  2. Add the below section in the function "moveByKey", please add in below of "var p = this.coords.p_pointer;"

     moveByKey: function (right) {
         var p = this.coords.p_pointer;
    
         // Start adding extra code for capturing the keyword without mouse clicking.
         if (!this.target)   {
             p = this.coords.p_from_fake;
             this.target = this.options.type;
         }
         // End
    
         ...
     }
    

@dmitru
Copy link

dmitru commented Jun 19, 2017

It's a shame this component doesn't support keyboard out of the box. Otherwise - great work!

@IonDen IonDen modified the milestones: 2.1.9, 3.0.0 Jun 19, 2017
@IonDen IonDen modified the milestones: 2.2.x, 2.1.9 Jun 19, 2017
@IonDen
Copy link
Owner

IonDen commented Jun 21, 2017

@Puffton, @leeish, @dmitru, @ukalpa, @vesrah
Implemented in 2.2.0

@IonDen IonDen closed this as completed Jun 21, 2017
@besuhoff
Copy link

besuhoff commented May 9, 2018

@IonDen hi, this is cool but doesn't solve tabIndex issue for type="double", so would be nice to actually have tabIndex on each .irs-slider, probably overridable via config

@IonDen
Copy link
Owner

IonDen commented May 9, 2018

@besuhoff, good point. Could you create another ticket with more detailed suggestion?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature request Request for a new functionality
Projects
None yet
Development

No branches or pull requests

7 participants