Skip to content

Commit

Permalink
stop propagation + upver
Browse files Browse the repository at this point in the history
  • Loading branch information
FrenchBen committed Apr 11, 2016
1 parent 9b7720b commit 9737817
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 8 deletions.
4 changes: 4 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
v0.7.1
================
* updated readme and added stopPropagation on internal events

v0.7.0
================
* removed px-dropdown-lock-width
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "px-dropdown",
"version": "0.7.0",
"version": "0.7.1",
"main": [
"px-dropdown.html"
],
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "px-dropdown",
"author": "General Electric",
"description": "A Px Dropdown component",
"version": "0.7.0",
"version": "0.7.1",
"private": true,
"extName" : null,
"repository" :
Expand Down
9 changes: 6 additions & 3 deletions px-dropdown-chevron.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,23 +75,26 @@
*
* @method _manipulateOpened
*/
_manipulateOpened: function() {
_manipulateOpened: function(evt) {
evt.stopPropagation();
this.opened = !this.opened;
},
/**
* this function sets the hover flag to false, and changes the class for the component
*
* @method _manipulateHoverOff
*/
_manipulateHoverOff: function() {
_manipulateHoverOff: function(evt) {
evt.stopPropagation();
this.hover = false;
},
/**
* this function sets the hover flag to true, and changes the class for the component
*
* @method _manipulateHoverOn
*/
_manipulateHoverOn: function() {
_manipulateHoverOn: function(evt) {
evt.stopPropagation();
this.hover = true;
},
/**
Expand Down
14 changes: 11 additions & 3 deletions px-dropdown.html
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@
],
listeners: {
'dropdown_flip': '_flipOpened',
'resize': '_reset',
'dropdown_content_request_size': '_provideCellSize',
'dropdown_content_value_changed': '_newTextValue',
'maxContCharacterWidth': '_newMaxContCharWidth'
Expand All @@ -202,6 +201,8 @@
_newTextValue: function(evt) {
this.set('displayValue',evt.detail.textValue);
this.fire('change');

evt.stopPropagation();
},
/**
* This function is called when we have a maximum character width
Expand All @@ -211,6 +212,7 @@
*/
_newMaxContCharWidth: function(evt) {
this.set('_maxCharWidth', evt.detail.maxContCharacterWidth);
evt.stopPropagation();
},
/**
* This function provide the cell size to the dropdown content
Expand All @@ -224,6 +226,8 @@

evt.detail.pxContent.dropCellWidth = rect.width;
evt.detail.pxContent.dropCellHeight = rect.height;

evt.stopPropagation();
},
/**
* This function checks whether the chevron should be visible or
Expand Down Expand Up @@ -305,16 +309,20 @@
this._reset();
}
this._flipOpened();
this.fire('dropdownOpen', evt);
this.fire('dropdownStateChanged', evt);
},
/**
* This function flips the "opened" property
*
* @method _flipOpened
*/
_flipOpened: function() {
_flipOpened: function(evt) {
this._fireChevron('opened');
this.opened = !this.opened;

if(evt) {
evt.stopPropagation();
}
},
/**
* This function checks to make sure the chevron exists, and if it does,
Expand Down

0 comments on commit 9737817

Please sign in to comment.