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

Closing keyboard #211

Closed
Bob-Score opened this issue Oct 14, 2013 · 3 comments
Closed

Closing keyboard #211

Bob-Score opened this issue Oct 14, 2013 · 3 comments

Comments

@Bob-Score
Copy link

Hi I am having an issue with trying to close a keyboard, it would seem that im doing something wrong with the close function but i cannot see what it is? have you any ideas? the surrounding divs close fine, i just get left with a floating unclosable keyboard :-)

HTML

            <div class="popup popupHidden" id="isCalc" data-level="1">
                <div class="popupContent" >
                    <div id="div_keyboard_anchor" class="keyboard_anchor">
                   </div>
                </div>
            </div>

CODE TO create the keyboard
the input calls a function called
test(this.id) and the input has an id of txt1

var $currentCalcUserID;

function test(inputID)
{
    currentCalcUserID = inputID

    $currentCalcUserID = $('#'+inputID+'');

function test2
{


        $currentCalcUserID.keyboard({
            stayOpen: true,
            layout: 'num',
            alwaysOpen:true,
            position: {
                of: $('#div_keyboard_anchor'),// null = attach to input/textarea; use $(sel) to attach elsewhere}
            }

        });

}

CODE TO close the keyboard

function close() // this is called by an img button
{
   var $xxx = $currentCalcUserID.getkeyboard();
        $xxx.close();
}
@Mottie
Copy link
Owner

Mottie commented Oct 14, 2013

Hi @Bob-Score!

Hmm, setting the alwaysOpen option to true won't close the keyboard. Maybe you meant to use the stayOpen option? It closes when the user hits escape or purposely opens another keyboard, clicking outside of the open keyboard won't close it.

@Bob-Score
Copy link
Author

Hi,
I have tried to use the stayopen function but as soon as i click anywhere other than the keypad area, it closes it. Any ideas?

@Mottie Mottie closed this as completed in 9213502 Oct 22, 2013
@Mottie
Copy link
Owner

Mottie commented Oct 22, 2013

Hi @Bob-Score!

Yeah sorry! That was a bug I introduced in a previous update. Thanks for catching it. Hopefully everything will work properly now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants