webstaff: when FF input gains focus, select contents
authorGalen Charlton <gmc@esilibrary.com>
Fri, 16 Oct 2015 18:02:39 +0000 (18:02 +0000)
committerKathy Lussier <klussier@masslnc.org>
Tue, 2 Feb 2016 19:58:51 +0000 (14:58 -0500)
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/web/js/ui/default/staff/cat/services/marcedit.js

index f2294aa..a81f7d8 100644 (file)
@@ -203,6 +203,11 @@ angular.module('egMarcMod', ['egCoreMod', 'ui.bootstrap'])
                 $scope.item_container = [];
                 $scope.in_handler = false;
                 $scope.ready = false;
+                $element.find('input').bind('focus', function (e) { e.target.select() });
+                $element.find('input').bind('mouseup', function(e) {
+                    e.preventDefault()
+                    return false;
+                });
 
                 $scope.$watch('content', function (newVal, oldVal) {
                     var input = $($element).find('input');