Mottie / Keyboard

Virtual Keyboard using jQuery ~
http://mottie.github.io/Keyboard/
Other
1.78k stars 723 forks source link

Problem with buttonHover class in Altkeys popup #556

Closed oz1cz closed 7 years ago

oz1cz commented 7 years ago

When a popup is displayed, there is an error in handling the css.buttonHover (typically "ui-state-hover") class:

  1. Go to the demonstration page, docs/altkeys-popup.html.
  2. Use your mouse to press the 'a' key long enough to bring up the popup. Note that the 'å' character is highlighted.
  3. Move the mouse into the 'æ' character (be careful that the mouse does not enter any other key before it reaches 'æ').
  4. Now both 'å' and 'æ' are highlighted.

This can be fixed thus: In jquery.keyboard.extension-altkeyspopup.js lines 291-293 (from version v1.26.21) replace

        } else {
            $( this ).addClass( base.options.css.buttonHover );`
        }

with

        } else {
            $keys.removeClass( base.options.css.buttonHover );
            $( this ).addClass( base.options.css.buttonHover );
        }

(I don't know if this is the simplest or best fix.)

Mottie commented 7 years ago

Hi @oz1cz!

Thanks again for your help and attention to details! I'll have this fixed shortly.