diff options
author | Allan Wang <me@allanwang.ca> | 2017-07-30 17:04:32 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-30 17:04:32 -0700 |
commit | 5583f519dd7c4843f045029b0e48fd882dd79c71 (patch) | |
tree | 778103d6d2822d0f33f8f0b4bab7239767fe7d63 /app/src/main/assets/js/textarea_listener.min.js | |
parent | 14185936f46160997ef9eaae92cb3c8eacae93c5 (diff) | |
download | frost-5583f519dd7c4843f045029b0e48fd882dd79c71.tar.gz frost-5583f519dd7c4843f045029b0e48fd882dd79c71.tar.bz2 frost-5583f519dd7c4843f045029b0e48fd882dd79c71.zip |
Feature/disable reload on textarea focus (#101)
* Implement and test
* Update themes again
Diffstat (limited to 'app/src/main/assets/js/textarea_listener.min.js')
-rw-r--r-- | app/src/main/assets/js/textarea_listener.min.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/app/src/main/assets/js/textarea_listener.min.js b/app/src/main/assets/js/textarea_listener.min.js new file mode 100644 index 00000000..44ae9ceb --- /dev/null +++ b/app/src/main/assets/js/textarea_listener.min.js @@ -0,0 +1,12 @@ +if(!window.hasOwnProperty("frost_textarea_listener")){ +console.log("Registering frost_textarea_listener"), +window.frost_textarea_listener=!0 +;var _frostFocus=function(e){ +var t=e.target||e.srcElement +;console.log("Frost focus",t.tagName),"TEXTAREA"===t.tagName&&"undefined"!=typeof Frost&&Frost.disableSwipeRefresh(!0) +},_frostBlur=function(e){ +var t=e.target||e.srcElement +;console.log("Frost blur",t.tagName),"undefined"!=typeof Frost&&Frost.disableSwipeRefresh(!1) +} +;document.addEventListener("focus",_frostFocus,!0),document.addEventListener("blur",_frostBlur,!0) +}
\ No newline at end of file |