Git Product home page Git Product logo

ionic-plugin-keyboard's Introduction

ionic-plugin-keyboard's People

Contributors

adamdbradley avatar ajoslin avatar alexangas avatar basvanbeek avatar christophe-f avatar felipegualberto avatar fernandopg avatar fraserxu avatar huerlisi avatar imhoffd avatar jonhainstock avatar mlynch avatar oliversalzburg avatar sebastianschirmer avatar shazron avatar tina-bitstrips avatar tlancina avatar tony-- 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  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  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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ionic-plugin-keyboard's Issues

Event Generation Causes CSP Violation for Android

For Android, this plugin calls appView.sendJavascript() which is a deprecated method. In turn, that method causes a CSP (Content-Security-Policy) violation unless 'unsafe-eval' is used in the policy rules. Updating the generation of the event would be helpful since I am trying to implement good security, plus that sendJavascript() call must eventually go away. I have not looked at iOS.

Can you give me a idea how to make the keyboad work correctly on Android

I want to implement below
When the input element is in the top half page , the page do not move top when the keyboard pop show. And when the input element is in the bottom half page, the page move top when the keyboard pop show. So the input element is always visible to user.

I finish some code , and it works a half

       window.addEventListener('native.keyboardshow', keyboardShowHandler);
        function keyboardShowHandler(e){
       //TODO  how can I get the focus Element's top?
            document.getElementsByTagName('body')[0].className = 'slidekeyboardin';
            document.getElementsByTagName('body')[0].style.marginTop = "-" + e.keyboardHeight + "px";
        }

        window.addEventListener('native.keyboardhide', keyboardHideHandler);
        function keyboardHideHandler(e){
           // alert('Goodnight, sweet prince');
            document.getElementsByTagName('body')[0].style.marginTop = "0px";
        }

Cannot read property 'hideKeyboardAccessoryBar' of undefined in Ripple Emulator

Hi. I get the following error when trying to run the ionic app with this plugin in the Ripple emulator. Other plugins do not cause such error.

missing exec:Keyboard.hideKeyboardAccessoryBar ripple.js:34331
Array[1]
 ripple.js:34332
TypeError
message: "Cannot read property 'hideKeyboardAccessoryBar' of undefined"
stack: (...)
get stack: function () { [native code] }
set stack: function () { [native code] }
__proto__: Error
 ripple.js:34333
TypeError: Cannot read property 'hideKeyboardAccessoryBar' of undefined
    at module.exports.exec (http://localhost:4400/ripple/assets/ripple.js:34328:30)
    at Function.Keyboard.hideKeyboardAccessoryBar (http://localhost:4400/plugins/com.ionic.keyboard/www/keyboard.js:10:5)
    at http://localhost:4400/js/app.js:14:42
    at Array.<anonymous> (http://localhost:4400/vendor/ionic/js/ionic.bundle.js:36865:19)
    at onPlatformReady (http://localhost:4400/vendor/ionic/js/ionic.bundle.js:2329:24)
    at Channel.fire (http://localhost:4400/cordova.js:760:23)
    at http://localhost:4400/cordova.js:223:49 ripple.js:34334
Keyboard ripple.js:50497
hideKeyboardAccessoryBar ripple.js:50498

I use autogenerated code on app run

.run(function ($ionicPlatform) {
        $ionicPlatform.ready(function () {
            // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
            // for form inputs)
            if (window.cordova && window.cordova.plugins.Keyboard) {
                cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
            }
            if (window.StatusBar) {
                // org.apache.cordova.statusbar required
                StatusBar.styleDefault();
            }
        });
    })

Black Flash iOS

Looked through the issues and didn't see anything about this, but is it normal that when the keyboard opens there is a black flash before it pops up?

Support for setting iOS UIReturnKeyType

We really need a feature to allow an ionic application to select whether the return key on the iOS keyboard says "GO" or one of the other allowable values such as "Next" (see below for other options). I know others have requested this functionality in the ionic forums but it seems that this keyboard plugin is the proper target for such a request.

The allowable values are:
typedef enum : NSInteger { UIReturnKeyDefault , UIReturnKeyGo , UIReturnKeyGoogle , UIReturnKeyJoin , UIReturnKeyNext , UIReturnKeyRoute , UIReturnKeySearch , UIReturnKeySend , UIReturnKeyYahoo , UIReturnKeyDone , UIReturnKeyEmergencyCall , } UIReturnKeyType;

how to make footer on top of keyboard?

Thanks for your plugin. it is much better then org.apache.cordova.keyboard

I would like to ask:

How can I put the footer on top of keyboard when it is open?

just like Whatsapp message input box is on top of the keyboard.

iOS show not implemented

Is there a reason why show is not handles by the iOS plugin? Event if there is no way to open the keyboard, shouldn't the plugin still handle the function call with a warning message? At the moment, it results in ERROR: Method 'show' not defined in Plugin 'Keyboard'.

Consider merging with cordova-plugin-keyboard

Hey guys, looking forward to trying beta4, but am a bit surprised to see a new keyboard plugin. Have you heard of org.apache.cordova.keyboard (github)?

I understand you may want to present a different interface for your users, so I have a potentially suggestion:

  • Add org.apache.cordova.keyboard as a <dependency> for your plugin
  • Provide an ionic interface over top of the cordova calls for the subset of features you want to present to your users
  • (Please) Contribute back any functionality you think the existing keyboard plugin lacks

Just a suggestion!

Plugin disables scrolling in iOS

Despite setting cordova.plugins.Keyboard.disableScroll(false); this plugin is disabling scrolling in iOS in our angular app (not using the ionic framework just yet).

Interestingly, there is a slight difference between toggling disableScroll using the JS call above. When it's enabled the scrollbar appears when attempting to scroll (it just doesn't move), and when it's disabled then no scroll bar appears at all (and no scrolling occurs either).

Thanks for this plugin guys!

Keyboard not showing on iPhone 6 Simulator

Although it has worked once or twice, about 80% of the time when focusing an input:

screenshot 2014-09-21 14 55 03

Don't have any iPhone 6's to test with, but this concerns me with whether its just the simulator.

Trying to dive in more, will update this issue if I find something.

Too many / wrong native.keyboardShow calls on iOS 8

Hi,

on iOS8 I have a weird behaviour. If I change the keyboard language/switch to emoji or slide up/down the proposal-bar, it will fire native.keyboardshow all the time. Please fix this and instead of this, provide native.keyboardChanged if possible. It causes many problems which I hadn't before on iOS7 cause I'm changing contentHeight based on keyboardHeight in order to display everything properly in my chat application. Thank you very much!

iOS Shake to Undo

Shaking the device after using the keyboard once and closing it will bring up the 'Undo Typing' alert even with the keyboard not present anymore.

So far I have tested this on an iPhone 4S iOS 7.1.1 prior to using the keyboard and after. Only happens after the keyboard has been used once. Test was done from within an Ionic based app using the popup. If it turns out to be an issue there I can submit it there instead.

Weird overscroll on iOS

Using this keyboard plugin, having some weird issues.

With the accessory bar removed, a weird gap appears below the end of the view.

http://imgur.com/DLtfjET

The scroll bar indicator pictures is at the bottom of the view.

Tried disabling scrolling, and still had the same problem.

Thoughts?

how to build third party custom keyboard with cordova/phonegap ?

iOS8 giving option to build custom third-party keyboard https://www.apple.com/uk/ios/ios8/quicktype/

Is it possible to build third party custom keyboard application for iOS8 with this cordova or phonegap ?

Actually I'm looking to build foreign language keyboard for iOS8, is there any solution or any plugin available for that ? https://developer.apple.com/library/prerelease/ios/documentation/General/Conceptual/ExtensibilityPG/Keyboard.html

Add Amazon-FireOS support

Adding Amazon FireOS support would be really nice, especially since the OS is basically Android without the Google stuff. Adding support also seems to be very easy, as all it requires is to copy the section in plugin.xml and change the name to "amazon-fireos".

I've been running the Ionic keyboard for months on my Amazon releases with no problems, but it is a bit annoying to have to modify the plugin.xml by hand each time I update to the latest version of the plugin. Official support for Amazon would really make it easier to keep the plugin updated.

Other than copying the Android section in the plugin.xml, there doesn't appear to be any other changes needed to support the Amazon Appstore. Please add support for Amazon apps.

ARC forbids explicit message send of 'dealloc'

After adding the plugin I bump into the following:

.../Plugins/com.ionic.keyboard/IonicKeyboard.m:100:12: error: ARC forbids explicit message send of 'dealloc'
    [super dealloc];
     ~~~~~ ^
1 error generated.

** BUILD FAILED **

Android: show keyboard with a proper type of it.

When cordova.plugins.Keyboard.show(); is called the plugin loads the text keyboard regardless of an input type.

For instance if an input has type set to tel the plugin should show us only the numeric keyboard.

keyboard-attach move up the footer in Android fullscreen=false mode

In config.xml,

(My app need the status bar ___)

In AndroidManifest.xml,
Both
android:windowSoftInputMode="adjustResize"
Or
android:windowSoftInputMode="adjustPan"

And with keyboard-attach in footer

    <ion-footer-bar class="bar bar-stable item-input-inset" keyboard-attach>
        <label id="telwrapper" class="item-input-wrapper">
            <input type="tel" id="tel" placeholder="Telephone Number" ng-model="tel">
        </label>
        <button class="button button-icon icon ion-ios7-telephone-outline" ng-click="create()"></button>
    </ion-footer-bar>

When the user focus on the input. The footer scroll up and detached from the keyboard.

In Android, the window is resized when keyboard go up in non-fullscreen mode.

We may need a native.beforeshowkeyboard event to record the screen height before and after keyboard shown up, in order to normalize the android and ios behaviour?

Thanks

select model only changes after keyboard closes

When using a select, the fields ng-model does not change when the user spins and then taps an available option. The ng-model only updates AFTER the keyboard is lowered.

Right now, there is no way for the user to close a select keyboard except for tapping somewhere on the screen.

If the model updated on user selection, we could listen to the model change event to know when to call cordova.plugins.Keyboard.close. This would be a much better UX than having to tap somewhere on the screen.

Alternatively, if there were some way to listen to taps on a selection, we could then close the keyboard.

Cordova version check >= 3.2

Is there anything in this plugin that wouldn't work with cordova 3.1? The reason I ask is because my project and many others use ionic + steroids, the latter runs with cordova 3.1.

Can't find keyplane that supports type 5 for keyboard

Hello,
I am seeing strange warning in my terminal logs while running my app with Keyboard plugin installed.
Can't find keyplane that supports type 5 for keyboard iPhone-PortraitTruffle-PhonePad; using 3008722378_PortraitTruffle_iPhone-Complex-Pad_Default
It happends when I tap onto my input field type='tel' the number pad opens and app works fine but I thought I would ask.

Any idea what it means?

Thanks a lot.

bug : Ipad undocked softkeyboard breaks ion-scroll

This is a weird bug.
When using the plugin on an iPad (iOS 7.1) with the softkeyboard in undocked mode, if you fill in a form (that opens the undocked keyboard) and submit the form with the submit button on the keyboard, it totally breaks the ion-scroll on the next page.

Everything is fine if the plugin is uninstalled or if the keyboard is docked.

How can I open numberpad automatically?

First of all, thanks for this wonderful plugin. I am using this plugin in my sample phonegap application.
In onDeviceReady(), I am calling cordova.plugins.Keyboard.show(); for opening the keyboard, by default it is opening a keyboard contains of both alphabets, numbers. I am using my input as type='number'. So when I click in to that text box, only numberpad is displaying. So how can i display this number keyboard by using cordova.plugins.Keyboard.show();. Please suggest.

Android Keyboard Issues

So I've been having quite a few issues with the keyboard plugin for Android (whereas it works perfectly with iOS). There are instances where when the keyboard pops up, it shrinks the whole webview and moves the input in extremely weird manners. This used to happen on iOS but was fixed with the disableScroll(true). Is there an equivalent way to fix this an Android?

com.ionic.keyboard causing issues

I was seeing weird issues when on both ios and android (emulated and actual device) when I had this plugin installed and tapped on an input/textarea:

  • Keyboard wouldn't show up (emulated only)
  • Scrolling all the way to the bottom on that page, the bottom 40% of the screen was all white, which means there was definitely some issue with the keyboard appearing incorrectly.
  • When entering any subsequent page with an ion-content, the content wouldn't scroll

Uninstalling the plugin fixes the issue, reinstalling it brings it back. I'm a newbie to ionic/cordova, so maybe I'm not using the right debug tools, but I haven't noticed any suspicious debug output. I've tried
debugging with chrome/safari remote debugging as well as the adb logcat and the xcode console window.

One suspicious thing is that everything was working fine on ios 2 days ago (not sure about android), but then I installed the latest xcode and os x command line updates yesterday. I wonder if they could be screwing with things. But I don't think that would explain the issues on android.

UIWebViewAccessoryHiding.h misisng

Did you forget to include that file?

/Users/driftyadmin/git/ionic-starter-login/platforms/ios/StarterApp/Plugins/com.ionic.keyboard/IonicKeyboard.m:2:9: fatal error:
      'UIWebViewAccessoryHiding.h' file not found
#import "UIWebViewAccessoryHiding.h"
        ^

Submit plugin to Phonegap-Build

Hi! First of all, great work on the Ionic project!

It would be great if you could submit this plugin to the Phonegap Build plugin repository (https://build.phonegap.com/plugins), so it can be used in remote builds.

I could do it myself but I thought it would be nice for you to have ownership over your own plugins :)

keyboard height is incorrect, includes the statusbar height within

Hello all,

As you can understand this is not the expected behavior.
What I did to solve it was to

  1. send the whole visible view height (rootView.getWindowVisibleDisplayFrame(r); ). Lets call it DispHeight
  2. keyboardHeight -= dispHeight - window.innerHeight

Hope it helps anyone

Cause bugs in bottom picker

I see this plugin is wonderful, I like to use it. It makes keyboard more native. And fix some bugs in our app.But it also cause some bugs, like
image
You see the bottom picker lost the done button on the keyboard bar, and never can be selected. I think this may cause the same bugs in time picker etc.

Force soft keyboard

If a physical keyboard is attached to an Android Device, like a barcode scanner, the soft keyboard does not appear until you disable the physical keyboard.

It would be great to have control over the soft keyboard even a physical one is connected.

Regards

native.keyboardshow Not Firing

I have a simple function that changes the text of a div on native.keyboardshow with cordova v. 3.5 on an ios app. The emulator has it working great on the iphone io 6.1 but its not firing on iphone retina io 7.1

Use on Windows causes app to not run

Hi,

I know windows 8 is not supported but for windows 8 I'm getting this error which causes the device to load as a blank white screen and the app to not respond.

my cordova build shows this as the error and I think the keyboard plugin is the issue for windows 8

The thread 0xae0 has exited with code 259 (0x103).
Error::Plugin not allowed in config.xml. Keyboard
The thread 0xc94 has exited with code 259 (0x103).

]

Add ability to change the label on "return" key

I love this plugin functionality. thanks for good work. I am wondering if we can add the functionality to change the "return" key labels to for example "Submit", "Search", "Done" ro whatever the custom text may be.

is it even possible?

keyboard stock when plugin is installed / problems in simulator

When I use this plugin, the keyboard will take like 5-10 seconds on iPhone6 to show up the first time (maybe caused trough the native.event I'm look for)

After the first "boot up", the keyboards works fine and shows up immediatley.

Please guys, this is the only good keyboard plugin for Phonegap (because of the functions, events and especially the keyboardHeight) - but you need to support a bit more.

This plugins also break the keyboard on simulator. I'm quite not skilled enough on Objective-C to fix this kind of problems.

keyboardheight not correct on Huawei P6

testing on a HUAWEI P6-U06 reports keyboardHeight with 177px (Android Keyboard, and 180px Huawai Keyboard) both values are wrong.
The height should be approximate 50px larger than reported by the event.

Does this only happen to me?

Getting error when input search box is going in and out of focus

I'm receiving an exception on iOS when going in and our of focus on the input search textbox. [FATAL] [NONE] Uncaught Exception: TypeError: 'undefined' is not an object (evaluating 'cordova.plugins.Keyboard') at (compiled_code):1

However, I'm able to close the keyboard successfully.
//I added the 4 files to project

//config.xml


//In a javascript controller
closeKeyboard = function() {

try {
    cordova.exec(null, null, "Keyboard", "close", []);
}
catch(err) {
            alert("error occurred")
}   

};

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.