You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by pu...@apache.org on 2016/09/09 00:59:47 UTC

[3/3] cordova-plugin-dialogs git commit: Select the text and put default value in the input directly.

Select the text and put default value in the input directly.


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/commit/03c8ad9d
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/tree/03c8ad9d
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/diff/03c8ad9d

Branch: refs/heads/master
Commit: 03c8ad9df8a529007a592bfc42cb4631f3440f4f
Parents: f3242ee
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Thu Sep 8 17:59:28 2016 -0700
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Thu Sep 8 17:59:28 2016 -0700

----------------------------------------------------------------------
 src/windows/NotificationProxy.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/blob/03c8ad9d/src/windows/NotificationProxy.js
----------------------------------------------------------------------
diff --git a/src/windows/NotificationProxy.js b/src/windows/NotificationProxy.js
index 57dfb96..2d32f83 100644
--- a/src/windows/NotificationProxy.js
+++ b/src/windows/NotificationProxy.js
@@ -81,6 +81,7 @@ function createPromptDialog(title, message, buttons, defaultText, callback) {
     dlg.querySelector('#lbl-title').appendChild(document.createTextNode(title));
     dlg.querySelector('#lbl-message').appendChild(document.createTextNode(message));
     dlg.querySelector('#prompt-input').setAttribute('placeholder', defaultText);
+    dlg.querySelector('#prompt-input').setAttribute('value', defaultText);
 
     function makeButtonCallback(idx) {
         return function () {
@@ -114,7 +115,7 @@ function createPromptDialog(title, message, buttons, defaultText, callback) {
     document.body.appendChild(dlgWrap);
 
     // make sure input field is under focus
-    dlg.querySelector('#prompt-input').focus();
+    dlg.querySelector('#prompt-input').select();
 
     return dlgWrap;
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org