Notice: The Monaca & Onsen UI Community Forum is shutting down.

For Onsen UI bug reports, feature requests and questions, please use the Onsen UI GitHub issues page. For help with Monaca, please contact Monaca Support Team.

Thank you to all our community for your contributions to the forum. We look forward to hearing from you in the new communication channels.

Placeholder of ons-input not replacing on iOS?



  • Hi there!

    This is my page:

    <ons-page ng-controller="LoginController" >
        <link rel="stylesheet" href="css/login.css" />
        <ons-toolbar>
            <div class="center">{{locale.login_title}}</div>
        </ons-toolbar>
    
        <div class="login-form">
            <img src="images/pixel.png" id="image_logo"/>
            <p class="login-fail" ng-show="isFailed">
                {{failMessage}}
            </p>
            
            <ons-input id="input_username" style="width: 100% !important" type="text" placeholder="{{locale.login_username}}" value=""></ons-input>
            <ons-input id="input_password" style="width: 100% !important" type="password" placeholder="{{locale.login_password}}" value=""></ons-input>
            <br><br>
            <ons-if platform="android">
                <ons-button modifier="material" class="login-button" ng-click="signIn()"><ons-icon icon="ion-load-c" spin="true" ng-if="isLoading"></ons-icon> {{locale.login_signin}}</ons-button>
            </ons-if>
            <ons-if platform="ios other">
                <ons-button modifier="large" class="login-button" ng-click="signIn()"><ons-icon icon="ion-load-c" spin="true" ng-if="isLoading"></ons-icon> {{locale.login_signin}}</ons-button>
            </ons-if>
        </div>
    </ons-page>
    

    on Android (material design) the placeholders in the “placeholder” attribute of ons-input get replaced, but on iOS they are not?
    0_1465589978187_10-06-2016_22-19-04[1].png

    As you can see I have other angular placeholders like on the button,etc… but they are replaced without problems. When I force usage of
    material design using ons.platform.select it works fine.

    Is this a quirk I didn’t read somewhere or a bug? (anyone else that wants to try this?)

    Regards,
    Maxim



  • bump();

    PS: Is this the correct subforum or should I’ve posted it somewhere else?



  • @Maxim-Van-de-Wynckel

    Angular is not my forte, but please see this codepen: https://codepen.io/anon/pen/dXMXZw?editors=101

    Placeholders work fine for me. I checked in Monaca debugger on Android and forced iOS.