Use WoltLabSource.isActive() to check whether the source view is enabled
authorTim Düsterhus <duesterhus@woltlab.com>
Wed, 17 Mar 2021 14:58:36 +0000 (15:58 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Wed, 17 Mar 2021 14:58:36 +0000 (15:58 +0100)
commitd5fd1d465cfb6c2281fcb9c23d9d6c5d9b0a8eb9
tree67b50ccc3ead129fe0b70a20548458ebf6f58ac7
parent576cb912abc0409b59ff6d87073d7bf589b57c06
Use WoltLabSource.isActive() to check whether the source view is enabled

Apparently the previous version, checking the height of the textarea, is broken
in the Kiwi Browser for Android even though it pretends to be a standard Chrome
88 without indicating anywhere within the User-Agent that it is not.

Luckily the fix is easy enough and technically the more correct solution even
for non-broken browsers.

I verified the correct functionality using Kiwi on Android and Firefox on
Linux.
wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabSource.js