Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

fixes #57 - The offcanvas menu automatically closes when the input is clicked in mobile #68

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

salaros
Copy link
Contributor

@salaros salaros commented Jul 3, 2017

Closes #57

@@ -353,6 +353,8 @@
oc = new Offcanvas $(this)

$(window).on 'resize', ->
if 'text' != $(document.activeElement).attr 'type'
return

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line contains inconsistent indentation. Expected 4 got 2.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm.. the next two lines feature two-space indentation, at least in my IDE (VS Code):

$('.navbar-offcanvas.in').each ->
  $(@).height('').removeClass 'in'

@@ -353,6 +353,8 @@
oc = new Offcanvas $(this)

$(window).on 'resize', ->
if 'text' != $(document.activeElement).attr 'type'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line contains inconsistent indentation. Expected 4 got 2.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are in CoffeeScript so we can just do

return if $(document.activeElement).attr('type') is 'text'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm totally fine with it

@iamphill
Copy link
Owner

iamphill commented Jul 5, 2017

Not really sure how @houndci-bot didn't catch the others before, I think you can just safely ignore them 👍

@@ -353,6 +353,8 @@
oc = new Offcanvas $(this)

$(window).on 'resize', ->
if 'text' != $(document.activeElement).attr 'type'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are in CoffeeScript so we can just do

return if $(document.activeElement).attr('type') is 'text'

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants