Comments (10)
Implemented (thanks to aFarkas) in dd4c5bb - however, doesn't work correctly in Firefox (doesn't repeat as expected).
I tried to switch to keypress event (in f48c45a) but unfortunately the arrow keys don't seem to work with this event in webkit (I've posted a message to the jquery forum about this, hopefully there is a workaround).
So leaving this ticket open until an all-round satisfactory solution is found...
from jscrollpane.
The reason that keypress doesn't work in Safari (also read the comments):
http://ejohn.org/blog/keypress-in-safari-31/
My post on the jQuery group about this problem:
http://forum.jquery.com/topic/keypress-event-arrow-keys-and-webkit
Looks like it will be a case of reverting back to keydown events and looking for a way to make them work correctly in firefox...
from jscrollpane.
I wanted to look into this issue, but for me seems to work on firefox. Did made something here? I have added some keyboad tweaks to my fork:
- if the user uses mousedown, the script blurs the tabindex-area (no outline)
- keyboard handling also inside of the jscroll-area, but not on form elements
Haven't testet this code much, but should work.
regards
alex
from jscrollpane.
Thanks for this :) I'm still seeing the weird behaviour on firefox (3.6.10/ OSX) with your latest code. To explain the problem further, I am seeing it on the basic.html demo by doing the following:
- Click in the top scrollpane to focus it.
- Press and hold the down arrow key.
What happens for me is that the scrollpane moves down by one jump. Then the scrollpane stops moving and instead the whole page starts scrolling.
Can you replicate this in Firefox? It works great for me in Chrome and other browsers (haven't tested Windows/IE yet).
Above you can see the link to the commit where I switched to keypress which works correctly in Firefox (and reduces the code a little because it fires repeats automatically internally) but this doesn't (and can't) work in webkit browsers.
I guess maybe a combination of the two approaches unless you can think of a better approach?
Thanks again for your help with this functionality :)
from jscrollpane.
Ok, now I can reproduce this bug on my Mac. I have testet and developed this with my PC. It seems it is a FF/Mac only issue. I will look into this.
from jscrollpane.
Keyboard scrolling is working fine in my latest. Or isn't it?
from jscrollpane.
There are still issues in Firefox/ OSX :(
If the page is long enough that the body needs to scroll and you focus a scroll pane and then hold down the down arrow then after the initial jump both the body and the scrollpane scroll. As per the description above. Other browsers seem to work OK (I haven't tested all of them but I believe this is specifically related to FF on OSX)...
Can you replicate the problem on OSX? As I say above, switching to keypress works well for FF/OSX - maybe the only solution will be two paths?
from jscrollpane.
If I only had an OSX in virtual machine..
I hope there is a simple way to fix that. Maybe suppress keypress while having a key registered as down through keydown/up?
from jscrollpane.
There is some interesting further information about keys here:
http://unixpapa.com/js/key.html
It seems that on Gecko Mac the only repeating key event is keypress (the problem is that an arrow key is a "special key" and so on IE and Webkit only a keydown event is fired).
From this it seems that adding a listener for keypress which returns false while a key is registered as down should work... I'll have a play and update once it's implemented...
from jscrollpane.
Fixed in 852b422, 7b239fa, f7a8238 and f3c46c7 - tested in latest versions of FF, Safari and Chrome on OSX and in FF and IE6, 7 & 8 on XP...
from jscrollpane.
Related Issues (20)
- main prop removed from package.json -> Build failed HOT 9
- Incorrect height of scrolling element after reinitialization. HOT 18
- Line with console.log HOT 9
- archive project / search for maintainers HOT 6
- reinitialise method: do not always apply new options HOT 1
- Improvement: pause and resume methods HOT 2
- Broken after updating from 2.0.22 to 2.1.2: jScrollPane is not a function (npm, webpack) HOT 29
- NPM shows rc releases tagged as "latest" HOT 2
- Focus on a input in a table will cause auto scrolling to top under jQuery 3 HOT 10
- Missing kinetic scroll on touch devices HOT 9
- Scrollpane is jumping to bottom HOT 2
- Console error in jquery when use cursor keys HOT 8
- When using stickToBottom and alwaysShowVScroll it does not start by sticking HOT 5
- How to get jScrollPane from node_modules HOT 1
- Jquery 3.5.0 Security Fix Closing HTML Tags HOT 4
- Jquery 4.0: Use of number-typed values is deprecated HOT 4
- click don't work after JScrollPane and Ajax HOT 10
- Error in jScrollPane - v2.2.3-rc.1 - jquery.jscrollpane.js HOT 3
- Still "border-box" problem HOT 3
- jScrollPane loads its own jQuery when used in webpack HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jscrollpane.