From c296db056eb5f7d611cce3b4e82107b54dbb5897 Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Fri, 10 Jul 2015 20:25:50 +0300 Subject: [PATCH] Fixed username hl in safari --- app/js/message_composer.js | 8 +++++--- app/js/services.js | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/js/message_composer.js b/app/js/message_composer.js index 705b40f6..a356746c 100644 --- a/app/js/message_composer.js +++ b/app/js/message_composer.js @@ -508,9 +508,11 @@ MessageComposer.prototype.setUpInput = function () { this.setUpPlaintext(); } - var sbWidth = getScrollWidth(); - if (sbWidth) { - (this.richTextareaEl || this.textareaEl).css({marginRight: -sbWidth}); + if (!Config.Mobile) { + var sbWidth = getScrollWidth(); + if (sbWidth) { + (this.richTextareaEl || this.textareaEl).css({marginRight: -sbWidth}); + } } } diff --git a/app/js/services.js b/app/js/services.js index 18bdf44e..4c70c818 100755 --- a/app/js/services.js +++ b/app/js/services.js @@ -4596,7 +4596,7 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils']) var usernameRegExp = "[a-zA-Z\\d_]{5,32}"; var botCommandRegExp = "\\/([a-zA-Z\\d_]{1,32})(?:@(" + usernameRegExp + "))?(\\s|$)" - var fullRegExp = new RegExp('(^|\\s)(@)(' + usernameRegExp + ')|(' + urlRegExp + ')|(\\n)|(' + emojiRegExp + ')|(^|\\s)(#[' + alphaNumericRegExp + ']{2,64})|(^|\\s)' + botCommandRegExp, 'i'); + var fullRegExp = new RegExp('(^| )(@)(' + usernameRegExp + ')|(' + urlRegExp + ')|(\\n)|(' + emojiRegExp + ')|(^|\\s)(#[' + alphaNumericRegExp + ']{2,64})|(^|\\s)' + botCommandRegExp, 'i'); var emailRegExp = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; var youtubeRegExp = /^(?:https?:\/\/)?(?:www\.)?youtu(?:|\.be|be\.com|\.b)(?:\/v\/|\/watch\\?v=|e\/|(?:\/\??#)?\/watch(?:.+)v=)(.{11})(?:\&[^\s]*)?/;