From f141095312a0b3686b489ffdd2f3f5ef5e3e9bd1 Mon Sep 17 00:00:00 2001 From: David Cormier Date: Sun, 23 Feb 2014 10:48:21 -0500 Subject: [PATCH] Add method to retrieve inputNode element from directive --- js/glowingbear.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/js/glowingbear.js b/js/glowingbear.js index 477d0ce..94bb211 100644 --- a/js/glowingbear.js +++ b/js/glowingbear.js @@ -995,6 +995,7 @@ weechat.directive('inputBar', function() { templateUrl: 'directives/input.html', controller: function($rootScope, $scope, + $element, connection, models) { @@ -1005,6 +1006,13 @@ weechat.directive('inputBar', function() { }); */ + + /* + * Returns the input element + */ + $scope.getInputNode = function() { + return $element.find('input')[0]; + }; $scope.completeNick = function() { // input DOM node var inputNode = document.getElementById('sendMessage');