Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Commit

Permalink
Fix error on selection click due to event.target being correct under …
Browse files Browse the repository at this point in the history
…real Shadow DOM
  • Loading branch information
justinfagnani committed May 21, 2017
1 parent d97c927 commit d7b077b
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions elements/designer-selection/designer-selection.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,13 @@
cursor: nwse-resize;
}
</style>
<div id="bounds"></div>
<div id="bounds" on-mousedown="_boundsDown"></div>
<template is="dom-repeat" items="{{directions}}">
<div
id$="{{item.name}}"
class="handle"
on-click="_onHandleClick">
on-click="_onHandleClick"
on-mousedown="_resizeHandleDown">
</div>
</template>
</template>
Expand All @@ -107,10 +108,6 @@
},
},

listeners: {
'mousedown': '_onMouseDown',
},

show() {
this.style.display = 'block';
},
Expand All @@ -123,14 +120,6 @@
domUtils.setBounds(this, bounds);
},

_onMouseDown(e) {
if (e.target.id == 'bounds') {
this._boundsDown(e);
} else {
this._resizeHandleDown(e);
}
},

_onHandleClick(e) {
e.stopPropagation();
},
Expand Down

0 comments on commit d7b077b

Please sign in to comment.