Git Product home page Git Product logo

keypad's People

Contributors

kbwood avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

keypad's Issues

Layout with a custom separator and randomize property

Layout with a custom separator and randomize property results in stray buttons at the end of each row

var numericLayout = ['7|8|9|'+$.keypad.CLOSE,
                '4|5|6|' + $.keypad.CLEAR,
                '1|2|3|' + $.keypad.BACK,
                '0']; 
$('#defaultKeypad').keypad({
    separator: '|', 
    randomiseNumeric: true, 
    keypadOnly: false, 
    layout: numericLayout
});

jquery-keypad-issue-pic

Javascript Error in Chrome when keypad is attched to input type=number

I’m getting a javascript error when using the keypad on an input type=number when using chrome. It doesn’t happen with firefox.

The error occurs when I click on the buttons of the keypad. The numbers do get added though.

It’s happening on the bolded line

if (input.is(':visible')) {
input.focus(); // for further typing
}
if (elem.setSelectionRange) { // Mozilla
if (input.is(':visible')) {
elem.setSelectionRange(pos, pos);
}
}

Here is the chrome error stack trace
Uncaught InvalidStateError: Failed to execute 'setSelectionRange' on 'HTMLInputElement': The input element's type ('number') does not support selection. jquery.keypad.modified.js:642
$.JQPlugin.createPlugin.insertValue jquery.keypad.modified.js:642
$.JQPlugin.createPlugin._selectValue jquery.keypad.modified.js:618
(anonymous function) jquery.keypad.modified.js:769

then it gets into the jquery code.

the only modification i have made to the code is swapping the space in numberic layout for a decimal character. the error happens without that change as well. (in case you were wondering why my file name is kquery.keypad.modified.js)

2 keypads on one screen with different dimensions causes rendering issues

To Repro:

  1. Put a number only keyboard on one input
  2. Put a full qwerty keyboard on another input.
  3. run the page, click on the number input.
  4. get a propererly rendered number keyboard
  5. click on the qwerty input, get a very skinny keyboard (it seems to be using the number keyboard dimensions).

You can see this happen on this demo page:
http://keith-wood.name/keypad.html (Layouts tab)

to see it there:

  1. Alphabetic on the "Alphabetic keypad" input
  2. Click on the "Full keyboard entry" input.
  3. notice how narrow it is, the close button, and numbers inputs are on a new row, when they should be beside

Interestingly, sometimes it reders it correctly, it seems to depend on if you click something else in between. and it seems like, on the demo page at least, that if you click in the box to open it, then click on the screen, then re-open it, it is the proper width.

image

Inline Keypad - randomiseNumeric: true - With multiple targets

The configuration Inline Keypad - randomiseNumeric: true - With multiple targets gives a strange user experience
The Inline Keypad is loaded a 1st time with random numeric key positions

But the numeric key positions are randomised again the first time you click on :

  1. any input field link to the multiple targets
  2. any button of the keypad itself

Is there a way to enhance the user experience : to keep the first random numeric key positions for all the user experience in the webpage on the different input fields ?

problem in cursor position in back and clear

if "keypadOnly" config set "false" for any time if we click back btn on keyboard, fild is unfocus and for handle back click we force to focus in field and again click back.
for delete any character we forced this steps.
i fixed this problem by get position in first line at method (_backValue) and decrease 1 from start and end and in end of method set this position for field.
for _clearValue method i focus in field end of method.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.