From 1baea18204b1520318e66113e0686a393ba2454e Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sun, 10 Nov 2013 01:37:41 +0100 Subject: [PATCH] Work-around for share dialog on iOS devices --- wcfsetup/install/files/js/WCF.Message.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/js/WCF.Message.js b/wcfsetup/install/files/js/WCF.Message.js index 1258c5aa67..656c9ea183 100644 --- a/wcfsetup/install/files/js/WCF.Message.js +++ b/wcfsetup/install/files/js/WCF.Message.js @@ -2785,7 +2785,12 @@ WCF.Message.Share.Content = Class.extend({ this._dialog.html(this._cache[$key]).wcfDialog('open'); } - this._dialog.find('input').click(function() { $(this).select(); }); + 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 + if (navigator.userAgent.match(/iP(ad|hone|od)/)) { + $inputElements.keydown(function() { return false; }).removeAttr('readonly').click(function() { this.setSelectionRange(0, 9999); }); + } } }); -- 2.20.1