Skip to content

Commit

Permalink
Fix #77
Browse files Browse the repository at this point in the history
  • Loading branch information
David van Leeuwen committed May 7, 2015
1 parent 3a3dc04 commit 91416fe
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 16 deletions.
2 changes: 1 addition & 1 deletion backbone.modal-bundled-min.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions backbone.modal-bundled.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion backbone.modal-min.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions backbone.modal.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions backbone.modal.theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -454,3 +454,7 @@
-webkit-animation-fill-mode: both;
-webkit-transform-origin: 50% 50%;
-webkit-backface-visibility: hidden; }

@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) {
.bbm-modal--open, .bbm-modal--stacked, .bbm-modal--stacked-reverse, .bbm-modal--destroy {
-webkit-animation: none !important; } }
8 changes: 4 additions & 4 deletions src/backbone.modal.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@
if @keyControl
# global events for key and click outside the modal
Backbone.$('body').on('keyup.bbm', @checkKey)
Backbone.$('body').on('mouseup.bbm', @clickOutsideElement)
Backbone.$('body').on('click.bbm', @clickOutside)
@$el.on('mouseup.bbm', @clickOutsideElement)
@$el.on('click.bbm', @clickOutside)

@modalEl.css(opacity: 1).addClass("#{@prefix}-modal--open")
@onShow?()
Expand Down Expand Up @@ -264,8 +264,8 @@

destroy: ->
Backbone.$('body').off('keyup.bbm', @checkKey)
Backbone.$('body').off('mouseup.bbm', @clickOutsideElement)
Backbone.$('body').off('click.bbm', @clickOutside)
@$el.off('mouseup.bbm', @clickOutsideElement)
@$el.off('click.bbm', @clickOutside)

Backbone.$('tester').remove()

Expand Down
9 changes: 7 additions & 2 deletions src/backbone.modal.theme.sass
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@
-webkit-transform-origin: 50% 50%
-webkit-backface-visibility: hidden


/* Open a stacked modal */
@-webkit-keyframes bbm-stacked
0%
Expand Down Expand Up @@ -483,4 +482,10 @@
-webkit-animation-timing-function: linear
-webkit-animation-fill-mode: both
-webkit-transform-origin: 50% 50%
-webkit-backface-visibility: hidden
-webkit-backface-visibility: hidden

// Fix for iPad safari bug (-webkit-animation-fill-mode and click events)
// Reference: https://github.com/awkward/backbone.modal/issues/77
@media only screen and (min-device-width : 768px) and (max-device-width : 1024px)
.bbm-modal--open, .bbm-modal--stacked, .bbm-modal--stacked-reverse, .bbm-modal--destroy
-webkit-animation: none !important

0 comments on commit 91416fe

Please sign in to comment.