This repository has been archived by the owner on Oct 8, 2021. It is now read-only.
Panel: Do not close in response to a default-prevented swipe event #6947
Closed
gabrielschulhof
wants to merge
3
commits into
master
from
6925-panel-ignores-default-prevented-swipe
Closed
Panel: Do not close in response to a default-prevented swipe event #6947
gabrielschulhof
wants to merge
3
commits into
master
from
6925-panel-ignores-default-prevented-swipe
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shouldn't this PR be closed as it has been merged into master? |
@Ruffio this has not yet been merged into master, AFAIK. |
if ( self.options.position === "left" ) { | ||
area.on( "swipeleft.panel", function(/* e */) { | ||
self.close(); | ||
// close the panel on swipe if the swipe event's default is not prevented |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
capital for first word in comment
gabrielschulhof
force-pushed
the
6925-panel-ignores-default-prevented-swipe
branch
from
August 22, 2014 09:47
3045191
to
2ce29a8
Compare
area.on( "swiperight.panel", function(/* e */) { | ||
self.close(); | ||
this._on( area, { | ||
swiperight: "_handleSwipe" | ||
}); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This whole if...else
can be simplified to
var event = {};
event[ "swipe" + this.options.position ] = "_handleSwipe";
this._on( area, event );
gabrielschulhof
force-pushed
the
6925-panel-ignores-default-prevented-swipe
branch
from
December 5, 2014 10:57
2ce29a8
to
8a72392
Compare
👍 |
gabrielschulhof
deleted the
6925-panel-ignores-default-prevented-swipe
branch
December 22, 2014 09:50
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes gh-6925
Note: This fix requires #6946 even though the automated tests pass, because in the automated tests I trigger swipe manually, with .trigger( "swipeleft" ) instead of calculating it from mouse events using the swipe special event. #6946 ensures that the swipe special event triggers correctly.