diff --git a/client/client/src/search-panel/search-panel.html b/client/client/src/search-panel/search-panel.html index 4490019f9..a37f839fa 100644 --- a/client/client/src/search-panel/search-panel.html +++ b/client/client/src/search-panel/search-panel.html @@ -1,7 +1,7 @@
- + diff --git a/client/core/src/directives/focus.js b/client/core/src/directives/focus.js index 4d36df5ee..e4985f7c4 100644 --- a/client/core/src/directives/focus.js +++ b/client/core/src/directives/focus.js @@ -1,24 +1,17 @@ import {module} from '../module'; -/** - * Sets the focus and selects the text on the input. - */ +// Sets the focus and selects the text on the input. + export function directive() { return { restrict: 'A', link: function($scope, $element, $attrs) { - let input = $element[0]; - let isInput = - input instanceof HTMLInputElement || - input instanceof HTMLTextAreaElement; - - if(!isInput) - input = input.querySelector('input, textarea'); - if(!input) - throw new Error(`vnFocus: Can't find an input element`); - - input.focus(); - input.select(); + $scope.$watch($attrs.vnFocus, function(value) { + if ($element[0].getElementsByTagName("INPUT")[0]) + $element[0].getElementsByTagName("INPUT")[0].focus(); + if ($element[0].getElementsByTagName("TEXTAREA")[0]) + $element[0].getElementsByTagName("TEXTAREA")[0].focus(); + }); } }; } diff --git a/services/nginx/logs/error.log b/services/nginx/logs/error.log index c55b819ca..2df222ca9 100644 --- a/services/nginx/logs/error.log +++ b/services/nginx/logs/error.log @@ -64,3 +64,4 @@ 2017/02/07 07:05:55 [notice] 3804#4508: signal process started 2017/02/07 07:05:55 [error] 3804#4508: OpenEvent("Global\ngx_stop_6996") failed (2: FormatMessage() error:(15100)) 2017/02/07 12:56:15 [notice] 9668#8064: signal process started +2017/02/08 12:53:38 [emerg] 9856#11204: CreateFile() "C:\Users\vfalco\Documents\vscode\salix\services\nginx/temp/error.log" failed (5: FormatMessage() error:(15100))