From 800279151cbb420beac2ff26875e972262704ecd Mon Sep 17 00:00:00 2001 From: jcesarmobile Date: Mon, 24 Feb 2020 15:59:12 +0100 Subject: [PATCH] fix(modals): make inputPlaceholder set a placeholder and not text (#2474) --- android/capacitor/src/main/java/com/getcapacitor/Dialogs.java | 2 +- ios/Capacitor/Capacitor/Plugins/Modals.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/android/capacitor/src/main/java/com/getcapacitor/Dialogs.java b/android/capacitor/src/main/java/com/getcapacitor/Dialogs.java index 8022e7c68f..321b2c28bf 100644 --- a/android/capacitor/src/main/java/com/getcapacitor/Dialogs.java +++ b/android/capacitor/src/main/java/com/getcapacitor/Dialogs.java @@ -158,7 +158,7 @@ public void run() { final AlertDialog.Builder builder = new AlertDialog.Builder(context); final EditText input = new EditText(context); - input.setText(promptInputPlaceholder); + input.setHint(promptInputPlaceholder); builder .setMessage(message) diff --git a/ios/Capacitor/Capacitor/Plugins/Modals.swift b/ios/Capacitor/Capacitor/Plugins/Modals.swift index 5712587354..0840a6d666 100644 --- a/ios/Capacitor/Capacitor/Plugins/Modals.swift +++ b/ios/Capacitor/Capacitor/Plugins/Modals.swift @@ -64,7 +64,7 @@ public class CAPModalsPlugin : CAPPlugin { DispatchQueue.main.async { alert.addTextField { (textField) in - textField.text = inputPlaceholder + textField.placeholder = inputPlaceholder } alert.addAction(UIAlertAction(title: okButtonTitle, style: UIAlertAction.Style.default, handler: { (action) -> Void in