mirror of
https://github.com/overleaf/overleaf.git
synced 2025-01-24 08:40:56 +00:00
Fix bug with click on share button registering
This commit is contained in:
parent
34d13d5b2d
commit
21f702a42e
2 changed files with 10 additions and 5 deletions
|
@ -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")}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue