Skip to content

Commit cf3673b

Browse files
committed
Select entire URL when share-url text box is clicked/focused.
The most common action when focusing the share-url text box is to 1) select all text, 2) copy or cut it. This automates step 1 by selecting all text whenever the text box is focused so that the user can simply copy the url right away. I think this leads to a better user experience.
1 parent cc46515 commit cf3673b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: playground/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<input type="button" value="Run" ng-click="run(false)" />
1414
<input type="button" value="Format" ng-click="format()" />
1515
<input type="button" value="Share" ng-click="share()" />
16-
<input type="text" class="show-share-url-{{showShareUrl}}" id="share-url" value="{{shareUrl}}" />
16+
<input type="text" class="show-share-url-{{showShareUrl}}" id="share-url" value="{{shareUrl}}" onfocus="select()" />
1717
<label><input ng-model="showGenerated" type="checkbox" />Show generated code for main package</label>
1818
</span>
1919
</div>

0 commit comments

Comments
 (0)