Giter VIP home page Giter VIP logo

Comments (7)

skol-pro avatar skol-pro commented on June 9, 2024

Hi mamcgree !
I'm really pleased you enjoy the plugin ! :-)

Ok, short tip regarding scrolling to input:

<input type="text" (click)="doSomething($event)"></input>
import { Content } from 'ionic-angular';

[...]

@Component({...})
export class CMP_NAME {
    @ViewChild(Content) content: Content;

    [...]

    public doSomething(event) {
        let target = event.target || event.srcElement || event.currentTarget;
        let offsetTop = target.offsetTop;

        // scrollTo(x, y, duration)
        this.content.scrollTo(0, offsetTop, 150);

        [...]
        // Show keyboard and all the stuff ;-)
    }
}

Hop it will help you, someone told me it worked for him, but haven't tested my-self.
I've planned on doing a bit of refactoring and making a service to handle all those things, hope I'm going to find time soon :-)

from ion-digit-keyboard-v2.

mamcgree avatar mamcgree commented on June 9, 2024

from ion-digit-keyboard-v2.

mamcgree avatar mamcgree commented on June 9, 2024

Greetings..

Your solution works, except for the items a the bottom of the list which cannot be scrolled above the keyboard. Any more suggestions??

Cheers..

from ion-digit-keyboard-v2.

skol-pro avatar skol-pro commented on June 9, 2024

Glad to read that :-)

Ha ha, well, you can work with an if statement based on offsetTop, if it's > of content - keyboard width, then add a temporary bottom margin to the input ? :-/ (that's a quick answer, don't know if it's the best :-p ... ).

from ion-digit-keyboard-v2.

mamcgree avatar mamcgree commented on June 9, 2024

from ion-digit-keyboard-v2.

mamcgree avatar mamcgree commented on June 9, 2024

from ion-digit-keyboard-v2.

skol-pro avatar skol-pro commented on June 9, 2024

from ion-digit-keyboard-v2.

Related Issues (20)

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.