From 24a2408bd215c02c56113cd6095b32f6d3db3a25 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Wed, 5 Feb 2014 22:43:16 +0100 Subject: [PATCH] Small optimization --- wcfsetup/install/files/js/WCF.Message.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/wcfsetup/install/files/js/WCF.Message.js b/wcfsetup/install/files/js/WCF.Message.js index c698005d1f..e4927d79f0 100644 --- a/wcfsetup/install/files/js/WCF.Message.js +++ b/wcfsetup/install/files/js/WCF.Message.js @@ -2773,7 +2773,6 @@ WCF.Message.Share.Content = Class.extend({ var $title = ($target.data('linkTitle') ? $target.data('linkTitle') : $link); var $key = $link.hashCode(); if (this._cache[$key] === undefined) { - // remove dialog contents var $dialogInitialized = false; if (this._dialog === null) { @@ -2808,10 +2807,16 @@ WCF.Message.Share.Content = Class.extend({ } } else { - this._dialog.html(this._cache[$key]).wcfDialog('open'); } + this._enableSelection(); + }, + + /** + * Enables text selection. + */ + _enableSelection: function() { var $inputElements = this._dialog.find('input').click(function() { $(this).select(); }); // Safari on iOS can only select the text if it is not readonly and setSelectionRange() is used -- 2.20.1