From 684dbf1e50e71afa06d792a8f070028af1df652d 2013-09-02 04:30:42
From: Kevin Burke <kevin@twilio.com>
Date: 2013-09-02 04:30:42
Subject: [PATCH] Select default title when renaming a notebook

The default notebook name is Untitled<x>. It is unlikely the user will want to
keep this name or part of it. Instead, select the text in the input field so the
user can easily type over the name and change it.

---

diff --git a/IPython/html/static/notebook/js/savewidget.js b/IPython/html/static/notebook/js/savewidget.js
index 8e2a16c..6fee780 100644
--- a/IPython/html/static/notebook/js/savewidget.js
+++ b/IPython/html/static/notebook/js/savewidget.js
@@ -52,7 +52,7 @@ var IPython = (function (IPython) {
         $([IPython.events]).on('checkpoints_listed.Notebook', function (event, data) {
             that.set_last_checkpoint(data[0]);
         });
-        
+
         $([IPython.events]).on('checkpoint_created.Notebook', function (event, data) {
             that.set_last_checkpoint(data);
         });
@@ -104,7 +104,7 @@ var IPython = (function (IPython) {
                         return false;
                     }
                 });
-                that.find('input[type="text"]').focus();
+                that.find('input[type="text"]').focus().select();
             }
         });
     }