projects
/
rails.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
b6b9052
)
Don't focus the text area on touch devices to avoid flashing the keyboard
author
Leo Koppelkamm
<diebuche@gmail.com>
Sun, 12 May 2013 16:49:07 +0000
(18:49 +0200)
committer
Tom Hughes
<tom@compton.nu>
Sun, 12 May 2013 18:26:05 +0000
(19:26 +0100)
Currently the keyboard slide out & hides again quickly.
app/assets/javascripts/index/notes.js.erb
patch
|
blob
|
history
diff --git
a/app/assets/javascripts/index/notes.js.erb
b/app/assets/javascripts/index/notes.js.erb
index f414f0e34621d1ff6e2d6b8ce8c016ab487b4e4b..b7331005bc6a99d0a4f740fd5bca1a80cb4d78c7 100644
(file)
--- a/
app/assets/javascripts/index/notes.js.erb
+++ b/
app/assets/javascripts/index/notes.js.erb
@@
-46,9
+46,12
@@
$(document).ready(function () {
}
});
- map.on("popupopen", function (e) {
- $(e.popup._container).find(".comment").focus();
- });
+ // Don't focus the text area on touch devices to avoid flashing the keyboard
+ if (!('ontouchstart' in document.documentElement)) {
+ map.on("popupopen", function (e) {
+ $(e.popup._container).find(".comment").focus();
+ });
+ }
map.on("popupclose", function (e) {
if (newNote && e.popup == newNote._popup) {