Multiple Ui improvements (#3678)
* Adding permalink back to mobile * Improving reply flow and fixing colorpicker on mobile * Hiding colorpicker on click only for mobile size screens
Этот коммит содержится в:
коммит произвёл
Christopher Speller
родитель
0b5a25a39e
Коммит
b263b0eb98
@@ -119,11 +119,13 @@ class CustomThemeChooser extends React.Component {
|
||||
});
|
||||
$('.color-picker').on('changeColor', this.onPickerChange);
|
||||
$('.group--code').on('change', this.onCodeThemeChange);
|
||||
document.addEventListener('click', this.closeColorpicker);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
$('.color-picker').off('changeColor', this.onPickerChange);
|
||||
$('.group--code').off('change', this.onCodeThemeChange);
|
||||
document.removeEventListener('click', this.closeColorpicker);
|
||||
}
|
||||
|
||||
componentDidUpdate() {
|
||||
@@ -136,6 +138,12 @@ class CustomThemeChooser extends React.Component {
|
||||
});
|
||||
}
|
||||
|
||||
closeColorpicker(e) {
|
||||
if (!$(e.target).closest('.color-picker').length && Utils.isMobile()) {
|
||||
$('.color-picker').colorpicker('hide');
|
||||
}
|
||||
}
|
||||
|
||||
onPickerChange(e) {
|
||||
const inputBox = e.target.childNodes[0];
|
||||
if (document.activeElement === inputBox && inputBox.value.length !== HEX_CODE_LENGTH) {
|
||||
|
||||
Ссылка в новой задаче
Block a user