# HG changeset patch # User cavaliet # Date 1379429888 -7200 # Node ID d2c4dbdf3548d7c519d012c9f1839abf753fba46 # Parent 594f79a5706bea703b89a1a72cf64cb8971f74cd hide dialogs on input focus diff -r 594f79a5706b -r d2c4dbdf3548 src/p4l/static/p4l/js/semantictree.js --- a/src/p4l/static/p4l/js/semantictree.js Tue Sep 17 16:11:13 2013 +0200 +++ b/src/p4l/static/p4l/js/semantictree.js Tue Sep 17 16:58:08 2013 +0200 @@ -44,7 +44,7 @@ angular.element(this).controller('ngModel').$setViewValue(uri); }, minLength: 2 - }); + }); } @@ -258,4 +258,11 @@ init_autocomplete(); init_browse(); init_tagit_autocomplete(); + // Close dialogs on click/focus. focus can not be listened because of obvious loop problem. + $(document).on('click', '.semantic-tree', function() { + $(".dialog").dialog("close"); + if(!$(this).is(":focus")){ + $(this).focus(); + } + }); }); \ No newline at end of file