mateuszmarkowski / jQuery-Seat-Charts

jQuery Seat Charts Plugin
MIT License
596 stars 209 forks source link

First seat gets selected when clicking elsewhere #79

Open titaniteChuck opened 5 years ago

titaniteChuck commented 5 years ago

Clicking anywhere in the div #chartSeat (not on a seat) toggles the top-left seat selection status. It toggles back at the next hovering of any seat. It also does not toggle if this seat is already selected.

Not that important, but it seems easy to fix :) This problem is present in your demo version if you want to check.

Great repo !

satriani05 commented 5 years ago

I got same problem also. Have you found the solution?

titaniteChuck commented 5 years ago

Hey satriani ! No I have'nt unfortunatly, it would have required to look into the sources, but I did not have the time nor the skills to do so

wg-glitch commented 5 years ago

I just worked on this today.

All you need to do is comment out or remove the following line within the jquery.seat-charts.js file. line 472: seats[seatIds[0]].focus();

I believe this is an accessibility feature, but needs some tweaking as it does lead to unexpected behaviour.

wg-glitch commented 5 years ago

Saying that the line above it. line 471: fn.find('.seatCharts-seat:not(.seatCharts-space):first').focus(); also needs removing otherwise the map jumps to the top.

I will have an investigate properly over the coming weeks and share anything that might be helpful...