Renamed 'hasOnlick' to 'hasOnclick', added function to StandardJS Globals (#1361)
This commit is contained in:
parent
f3c849b78f
commit
63489fe23f
@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
'use strict'
|
||||
/* global Config, location, templateUrl, onContentLoaded, tsNow, cancelEvent, safeReplaceObject, dT, SearchIndexManager, setZeroTimeout, versionCompare, calcImageInBox, getSelectedText, SVGElement */
|
||||
/* global Config, location, templateUrl, onContentLoaded, tsNow, cancelEvent, safeReplaceObject, dT, SearchIndexManager, setZeroTimeout, versionCompare, calcImageInBox, getSelectedText, SVGElement, hasOnclick */
|
||||
|
||||
/* Controllers */
|
||||
|
||||
@ -1666,7 +1666,7 @@ angular.module('myApp.controllers', ['myApp.i18n'])
|
||||
target.className.indexOf('im_message_body') != -1) {
|
||||
break
|
||||
}
|
||||
if (target.tagName == 'A' || hasOnlick(target)) {
|
||||
if (target.tagName == 'A' || hasOnclick(target)) {
|
||||
return false
|
||||
}
|
||||
target = target.parentNode
|
||||
|
@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
'use strict'
|
||||
/* global Config, templateUrl, onContentLoaded, cancelEvent, dT, setZeroTimeout calcImageInBox, getSelectedText,Scroller, setFieldSelection, scrollToNode, EmojiTooltip, EmojiPanel, MessageComposer, checkDragEvent, checkClick, Image, Clipboard, EmojiHelper, encodeEntities, FB, twttr, gapi, isInDOM */
|
||||
/* global Config, templateUrl, onContentLoaded, cancelEvent, dT, setZeroTimeout calcImageInBox, getSelectedText,Scroller, setFieldSelection, scrollToNode, EmojiTooltip, EmojiPanel, MessageComposer, checkDragEvent, checkClick, Image, Clipboard, EmojiHelper, encodeEntities, FB, twttr, gapi, isInDOM, hasOnclick */
|
||||
|
||||
/* Directives */
|
||||
|
||||
@ -2848,7 +2848,7 @@ angular.module('myApp.directives', ['myApp.filters'])
|
||||
}
|
||||
}
|
||||
|
||||
if (element[0].tagName == 'A' && !hasOnlick(element[0])) {
|
||||
if (element[0].tagName == 'A' && !hasOnclick(element[0])) {
|
||||
element.on('click', function () {
|
||||
if (peerID > 0) {
|
||||
AppUsersManager.openUser(peerID, override)
|
||||
|
@ -62,7 +62,7 @@ function cancelEvent (event) {
|
||||
return false
|
||||
}
|
||||
|
||||
function hasOnlick (element) {
|
||||
function hasOnclick (element) {
|
||||
if (element.onclick ||
|
||||
element.getAttribute('ng-click')) {
|
||||
return true
|
||||
|
Loading…
Reference in New Issue
Block a user