Skip to content

Commit

Permalink
[FIX] Search Menu - focusin/out for IOS text area - problem with enab…
Browse files Browse the repository at this point in the history
…ling scrolling
  • Loading branch information
ondrejbartas committed Mar 12, 2014
1 parent 20f1bc3 commit 6c161eb
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions app/assets/javascripts/views/search_menu.js.em.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@ class PickwickApp.SearchMenuView extends Ember.View
didInsertElement: ->
$('textarea').autoGrow()

<% if Rails.env != "build_ios" %>
<% if Rails.env == "build_ios" %>
$('.click_on_textarea').focusin ->
$('#frame_menu form.col').css('padding-bottom', "20px")
$('#frame_menu .infinite-scroll-box').scrollTo({top: 20, left: 0}, {duration:0})
$('.click_on_textarea').focusout ->
$('#frame_menu form.col').css('padding-bottom', "10px")
<% end %>
$('.click_on_textarea').click ->
console.log("clicked od textarea")
$(this).find("textarea").focus()
Expand All @@ -20,7 +26,6 @@ class PickwickApp.SearchMenuView extends Ember.View
$('.click_on_select').click ->
console.log("clicked od select")
$(this).find('select').focus()
<% end %>

swipeEnd: (recognizer, evt) ->
direction = recognizer.get("swipeDirection")
Expand Down

0 comments on commit 6c161eb

Please sign in to comment.