Bugfixes
This commit is contained in:
parent
97b2ce9086
commit
0c11fc6a1f
@ -2184,7 +2184,7 @@ angular.module('myApp.controllers', ['myApp.i18n'])
|
||||
} else {
|
||||
$scope.draftMessage.text = '/';
|
||||
}
|
||||
$scope.$broadcast('ui_peer_draft');
|
||||
$scope.$broadcast('ui_peer_draft', {focus: true});
|
||||
return cancelEvent($event);
|
||||
}
|
||||
|
||||
|
@ -1568,7 +1568,7 @@ angular.module('myApp.directives', ['myApp.filters'])
|
||||
}
|
||||
|
||||
$scope.$on('ui_peer_change', composer.resetTyping.bind(composer));
|
||||
$scope.$on('ui_peer_draft', function () {
|
||||
$scope.$on('ui_peer_draft', function (e, options) {
|
||||
var isBroadcast = $scope.draftMessage.isBroadcast;
|
||||
composer.setPlaceholder(_(isBroadcast ? 'im_broadcast_field_placeholder_raw' : 'im_message_field_placeholder_raw'));
|
||||
|
||||
@ -1576,7 +1576,7 @@ angular.module('myApp.directives', ['myApp.filters'])
|
||||
composer.setValue($scope.draftMessage.text || '');
|
||||
updateHeight();
|
||||
}
|
||||
if (!Config.Navigator.touch) {
|
||||
if (!Config.Navigator.touch || options && options.focus) {
|
||||
composer.focus();
|
||||
}
|
||||
onContentLoaded(function () {
|
||||
|
@ -96,6 +96,13 @@
|
||||
}
|
||||
};
|
||||
|
||||
if (Config.Modes.force_mobile) {
|
||||
layout = 'mobile';
|
||||
}
|
||||
else if (Config.Modes.force_desktop) {
|
||||
layout = 'desktop';
|
||||
}
|
||||
|
||||
switch (layout) {
|
||||
case 'mobile': Config.Mobile = true; break;
|
||||
case 'desktop': Config.Mobile = false; break;
|
||||
|
@ -30,6 +30,8 @@ Config.Modes = {
|
||||
debug: location.search.indexOf('debug=1') > 0,
|
||||
http: location.search.indexOf('http=1') > 0,
|
||||
ssl: location.search.indexOf('ssl=1') > 0 || location.protocol == 'https:' && location.search.indexOf('ssl=0') == -1,
|
||||
force_mobile: location.search.indexOf('mobile=1') > 0,
|
||||
force_desktop: location.search.indexOf('desktop=1') > 0,
|
||||
nacl: location.search.indexOf('nacl=0')== -1,
|
||||
webcrypto: location.search.indexOf('webcrypto=0')== -1,
|
||||
packed: location.protocol == 'app:' || location.protocol == 'chrome-extension:',
|
||||
|
@ -216,6 +216,10 @@ function getRichElementValue(node, lines, line, selNode, selOffset) {
|
||||
|
||||
function setRichFocus(field, selectNode) {
|
||||
field.focus();
|
||||
if (selectNode && selectNode.parentNode == field && !selectNode.nextSibling) {
|
||||
field.removeChild(selectNode);
|
||||
selectNode = null;
|
||||
}
|
||||
if (window.getSelection && document.createRange) {
|
||||
var range = document.createRange();
|
||||
if (selectNode) {
|
||||
|
@ -28,6 +28,7 @@
|
||||
"group_modal_members_kick": "Remove",
|
||||
|
||||
"channel_modal_info": "Channel info",
|
||||
"channel_modal_description": "Description",
|
||||
"channel_modal_share_link": "Share link",
|
||||
"channel_modal_share_loading": "Loading{dots}",
|
||||
"channel_modal_join": "Join channel",
|
||||
|
@ -880,11 +880,17 @@ MessageComposer.prototype.onEmojiSelected = function (code, autocomplete) {
|
||||
}
|
||||
textarea.value = newValue;
|
||||
|
||||
this.selId = (this.selId || 0) + 1;
|
||||
var html = this.getRichHtml(newValuePrefix) + ' <span id="composer_sel' + this.selId + '"></span>' + this.getRichHtml(suffix);
|
||||
|
||||
this.richTextareaEl.html(html);
|
||||
setRichFocus(textarea, $('#composer_sel' + this.selId)[0]);
|
||||
var html;
|
||||
if (suffix.length) {
|
||||
this.selId = (this.selId || 0) + 1;
|
||||
html = this.getRichHtml(newValuePrefix) + ' <span id="composer_sel' + this.selId + '"></span>' + this.getRichHtml(suffix);
|
||||
this.richTextareaEl.html(html);
|
||||
setRichFocus(textarea, $('#composer_sel' + this.selId)[0]);
|
||||
} else {
|
||||
html = this.getRichHtml(newValuePrefix) + ' ';
|
||||
this.richTextareaEl.html(html);
|
||||
setRichFocus(textarea);
|
||||
}
|
||||
} else {
|
||||
var html = this.getEmojiHtml(code);
|
||||
if (window.getSelection) {
|
||||
@ -967,11 +973,17 @@ MessageComposer.prototype.onMentionSelected = function (username) {
|
||||
}
|
||||
textarea.value = newValue;
|
||||
|
||||
this.selId = (this.selId || 0) + 1;
|
||||
var html = this.getRichHtml(newValuePrefix) + ' <span id="composer_sel' + this.selId + '"></span>' + this.getRichHtml(suffix);
|
||||
|
||||
this.richTextareaEl.html(html);
|
||||
setRichFocus(textarea, $('#composer_sel' + this.selId)[0]);
|
||||
var html;
|
||||
if (suffix.length) {
|
||||
this.selId = (this.selId || 0) + 1;
|
||||
html = this.getRichHtml(newValuePrefix) + ' <span id="composer_sel' + this.selId + '"></span>' + this.getRichHtml(suffix);
|
||||
this.richTextareaEl.html(html);
|
||||
setRichFocus(textarea, $('#composer_sel' + this.selId)[0]);
|
||||
} else {
|
||||
html = this.getRichHtml(newValuePrefix) + ' ';
|
||||
this.richTextareaEl.html(html);
|
||||
setRichFocus(textarea);
|
||||
}
|
||||
}
|
||||
else {
|
||||
var textarea = this.textareaEl[0];
|
||||
|
@ -1400,6 +1400,16 @@ a.im_panel_peer_photo .peer_initials {
|
||||
}
|
||||
}
|
||||
|
||||
.im_edit_panel {
|
||||
&_wrap.im_edit_small_panel_wrap {
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
|
||||
.im_edit_small_panel_wrap &_border {
|
||||
margin-bottom: 7px;
|
||||
}
|
||||
}
|
||||
|
||||
/* Peer modals */
|
||||
.user_modal {
|
||||
&_window .modal-dialog {
|
||||
|
@ -50,7 +50,7 @@
|
||||
<div class="md_modal_section_param_value">
|
||||
<span ng-bind-html="chatFull.rAbout"></span>
|
||||
</div>
|
||||
<div class="md_modal_section_param_name" my-i18n="user_modal_about"></div>
|
||||
<div class="md_modal_section_param_name" my-i18n="channel_modal_description"></div>
|
||||
</div>
|
||||
|
||||
<div class="md_modal_section_param_wrap" ng-if="chatFull.chat.username">
|
||||
|
@ -139,7 +139,7 @@
|
||||
|
||||
<div class="im_bottom_panel_wrap">
|
||||
|
||||
<div class="im_edit_panel_wrap clearfix" ng-show="historyState.actions()" ng-switch="historyState.actions()">
|
||||
<div class="im_edit_panel_wrap clearfix" ng-show="historyState.actions()" ng-switch="historyState.actions()" ng-class="historyState.channelActions !== false ? 'im_edit_small_panel_wrap' : ''">
|
||||
<div class="im_edit_panel_border"></div>
|
||||
|
||||
<div ng-switch-when="bot">
|
||||
|
@ -63,7 +63,7 @@
|
||||
</div>
|
||||
|
||||
<div class="mobile_modal_section" ng-if="chatFull.rAbout">
|
||||
<h4 class="mobile_modal_section_header" my-i18n="user_modal_about"></h4>
|
||||
<h4 class="mobile_modal_section_header" my-i18n="channel_modal_description"></h4>
|
||||
<div class="mobile_modal_section_value" ng-bind-html="chatFull.rAbout"></div>
|
||||
</div>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user