mirror of
https://github.com/humhub/humhub.git
synced 2025-01-17 14:18:27 +01:00
Fix #3942: Show password icon not placed correctly if field was initially hidden
This commit is contained in:
parent
b1db317965
commit
125d09588b
@ -9,6 +9,7 @@ HumHub Change Log
|
|||||||
- Fix #3914: Directory link in space chooser still visible when directory module not active
|
- Fix #3914: Directory link in space chooser still visible when directory module not active
|
||||||
- Fix #3915: Removed default border from canvas style
|
- Fix #3915: Removed default border from canvas style
|
||||||
- Fix #3885: Prevent comments on archived content
|
- Fix #3885: Prevent comments on archived content
|
||||||
|
- Fix #3942: Show password icon not placed correctly if field was initially hidden
|
||||||
|
|
||||||
1.4.3 (March 4, 2020)
|
1.4.3 (March 4, 2020)
|
||||||
---------------------
|
---------------------
|
||||||
|
@ -14,9 +14,21 @@ humhub.module('ui.form.elements', function (module, require, $) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
additions.register('password', '[type="password"]', function ($match) {
|
additions.register('password', '[type="password"]', function ($match) {
|
||||||
|
|
||||||
$match.each(function () {
|
$match.each(function () {
|
||||||
var $input = $(this);
|
var $input = $(this);
|
||||||
var $formGroup = $input.parent('.form-group');
|
var $formGroup = $input.parent('.form-group');
|
||||||
|
var invisibleTop = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* We can't calculate top if input is invisible,
|
||||||
|
* Note, this may not work for more complex cases.
|
||||||
|
*/
|
||||||
|
if(!$input.is(':visible')) {
|
||||||
|
if($input.siblings('label').length) {
|
||||||
|
invisibleTop = '23px';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if($formGroup.length) {
|
if($formGroup.length) {
|
||||||
$formGroup.css('position', 'relative');
|
$formGroup.css('position', 'relative');
|
||||||
@ -35,7 +47,7 @@ humhub.module('ui.form.elements', function (module, require, $) {
|
|||||||
'padding': '4px',
|
'padding': '4px',
|
||||||
'font-size': '19px',
|
'font-size': '19px',
|
||||||
'cursor': 'pointer',
|
'cursor': 'pointer',
|
||||||
'top': $input.position().top
|
'top': !$input.is(':visible') ? invisibleTop : $input.position().top
|
||||||
});
|
});
|
||||||
|
|
||||||
$formGroup.prepend($pwShow);
|
$formGroup.prepend($pwShow);
|
||||||
@ -127,7 +139,7 @@ humhub.module('ui.form.elements', function (module, require, $) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
var timeZoneSelected = function(evt) {
|
var timeZoneSelected = function(evt) {
|
||||||
$toggleButton = evt.$trigger.parent().siblings('.timeZoneToggle:first');
|
var $toggleButton = evt.$trigger.parent().siblings('.timeZoneToggle:first');
|
||||||
$toggleButton.text(evt.$trigger.find('option:selected').text());
|
$toggleButton.text(evt.$trigger.find('option:selected').text());
|
||||||
evt.$trigger.parent().hide();
|
evt.$trigger.parent().hide();
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user