Skip to content

Commit 70fe9f9

Browse files
committed
Fix share link password input
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
1 parent b4a410e commit 70fe9f9

2 files changed

Lines changed: 25 additions & 12 deletions

File tree

apps/files_sharing/css/sharetabview.scss

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,13 @@
2323
.shareWithLoading {
2424
padding-left: 10px;
2525
right: 35px;
26-
top: 0px;
26+
top: 3px;
2727
}
28-
.shareWithConfirm,
29-
.clipboardButton,
30-
.linkPass .icon-loading-small {
28+
.shareWithConfirm {
3129
position: absolute;
3230
right: 2px;
3331
top: 6px;
3432
padding: 14px;
35-
}
36-
.shareWithConfirm {
3733
opacity: 0.5;
3834
}
3935
.shareWithField:focus ~ .shareWithConfirm {
@@ -46,6 +42,21 @@
4642
padding: 14px;
4743
}
4844
.popovermenu {
45+
.linkPassMenu {
46+
.share-pass-submit {
47+
width: auto !important;
48+
}
49+
.icon-loading-small {
50+
background-color: var(--color-main-background);
51+
position: absolute;
52+
right: 8px;
53+
margin: 3px;
54+
padding: 10px;
55+
width: 32px;
56+
height: 32px;
57+
z-index: 10;
58+
}
59+
}
4960
.datepicker {
5061
margin-left: 35px;
5162
}

core/js/sharedialoglinkshareview.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
' </span></li>' +
9494
' <li class="{{#unless isPasswordSet}}hidden{{/unless}} linkPassMenu"><span class="shareOption menuitem icon-share-pass">' +
9595
' <input id="linkPassText-{{cid}}" class="linkPassText" type="password" placeholder="{{passwordPlaceholder}}" autocomplete="new-password" />' +
96+
' <input type="submit" class="icon-confirm share-pass-submit" value="" />' +
9697
' <span class="icon icon-loading-small hidden"></span>' +
9798
' </span></li>' +
9899
'{{/if}}' +
@@ -189,8 +190,8 @@
189190
// open menu
190191
'click .share-menu .icon-more': 'onToggleMenu',
191192
// password
192-
'focusout input.linkPassText': 'onPasswordEntered',
193-
'keyup input.linkPassText': 'onPasswordKeyUp',
193+
'click input.share-pass-submit': 'onPasswordEntered',
194+
'keyup input.linkPassText': 'onPasswordKeyUp', // check for the enter key
194195
'change .showPasswordCheckbox': 'onShowPasswordClick',
195196
'change .publicEditingCheckbox': 'onAllowPublicEditingChange',
196197
// copy link url
@@ -374,11 +375,12 @@
374375
},
375376
error: function(model, msg) {
376377
// destroy old tooltips
377-
$input.tooltip('destroy');
378+
var $container = $input.parent();
379+
$container.tooltip('destroy');
378380
$input.addClass('error');
379-
$input.attr('title', msg);
380-
$input.tooltip({placement: 'bottom', trigger: 'manual'});
381-
$input.tooltip('show');
381+
$container.attr('title', msg);
382+
$container.tooltip({placement: 'bottom', trigger: 'manual'});
383+
$container.tooltip('show');
382384
}
383385
});
384386
},

0 commit comments

Comments
 (0)