jquery.textSelection: Remove unnecessary checks
authorBartosz Dziewoński <matma.rex@gmail.com>
Mon, 5 Feb 2018 21:52:05 +0000 (22:52 +0100)
committerJforrester <jforrester@wikimedia.org>
Wed, 7 Feb 2018 18:53:26 +0000 (18:53 +0000)
commit82e996b8c63e1f49525020ad71082c366b9567ba
treed77caf666b3aef7c94b7bd90c6c173cd36ecbbd8
parentc619ffe30a043601dbc06c79b5704294fed4a46e
jquery.textSelection: Remove unnecessary checks

Some of the commands were wrapped in unnecessary checks (which were
also inconsistent between the different commands):

* Checking if this element is hidden. I'm guessing this was a
  workaround for some IE 6 bugs where doing things to the selection
  of hidden elements would break horribly. In any case, this should
  not be this code's responsibility.

* Checking for undefined this.selectionStart. I probably should have
  removed these in 1430ca85dcf9cb3f77a92bee6a915473e465f649. The only
  remaining case for them would be if .textSelection() is called on
  something that is not a text input element, which should not happen.

Change-Id: Ib09e64399921fe3861efd4877c6ecb2f900aef09
resources/src/jquery/jquery.textSelection.js