diff --git a/services/web/app/views/project/editor/share.jade b/services/web/app/views/project/editor/share.jade index bce5674ad6..f93519e657 100644 --- a/services/web/app/views/project/editor/share.jade +++ b/services/web/app/views/project/editor/share.jade @@ -72,9 +72,12 @@ script(type='text/ng-template', id='shareProjectModalTemplate') option(value="readAndWrite") #{translate("can_edit")} option(value="readOnly") #{translate("read_only")} |    + //- We have to use mousedown here since click has issues with the + //- blur handler in tags-input sometimes changing its height and + //- moving this button, preventing the click registering. button.btn.btn-info( type="submit" - ng-click="addMembers()" + ng-mousedown="addMembers()" ) #{translate("share")} div.text-center(ng-hide="canAddCollaborators") p #{translate("need_to_upgrade_for_more_collabs")}. @@ -86,7 +89,7 @@ script(type='text/ng-template', id='shareProjectModalTemplate') .modal-footer .modal-footer-left i.fa.fa-refresh.fa-spin(ng-show="state.inflight") - span.text-danger.error(ng-show="state.error") {{ state.error }} + span.text-danger.error(ng-show="state.error") #{translate("generic_something_went_wrong")} button.btn.btn-primary( ng-click="done()" ) #{translate("done")} diff --git a/services/web/public/coffee/ide/share/controllers/ShareProjectModalController.coffee b/services/web/public/coffee/ide/share/controllers/ShareProjectModalController.coffee index b195a03afb..bb945a9ebc 100644 --- a/services/web/public/coffee/ide/share/controllers/ShareProjectModalController.coffee +++ b/services/web/public/coffee/ide/share/controllers/ShareProjectModalController.coffee @@ -53,7 +53,7 @@ define [ return false $scope.addMembers = () -> - $timeout -> # Give email list a chance to update + addMembers = () -> return if $scope.inputs.contacts.length == 0 members = $scope.inputs.contacts @@ -97,8 +97,10 @@ define [ , 0 .error () -> $scope.state.inflight = false - $scope.state.error = "Sorry, something went wrong :(" - + $scope.state.error = true + + + $timeout addMembers, 50 # Give email list a chance to update $scope.removeMember = (member) -> $scope.state.error = null