Skip to content

Commit

Permalink
Auto merge of #1833 - kzys:fix-dropdown, r=locks
Browse files Browse the repository at this point in the history
Fix ESLint issues

During #1832, I've realized that the indentation on `app/mixins/rl-dropdown-component.js` is off.
  • Loading branch information
bors committed Sep 8, 2019
2 parents b4a6c66 + f953451 commit 8b1d937
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 17 deletions.
8 changes: 0 additions & 8 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,6 @@ module.exports = {
},
rules: {
'prettier/prettier': 'error',

'arrow-parens': 'off',
'brace-style': 'off',
camelcase: 'off',
'comma-dangle': 'off',
'dot-notation': 'off',
'operator-linebreak': 'off',

'ember/no-observers': 'warn',
'ember/no-new-mixins': 'warn',
'ember/require-return-from-computed': 'warn',
Expand Down
18 changes: 9 additions & 9 deletions app/mixins/rl-dropdown-component.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ export default Mixin.create({

if (this.dropdownExpanded) {
/* Add clickout handler with 1ms delay, to allow opening the dropdown
* by clicking e.g. a checkbox and binding to dropdownExpanded, without
* having the handler close the dropdown immediately. */
* by clicking e.g. a checkbox and binding to dropdownExpanded, without
* having the handler close the dropdown immediately. */
later(() => {
$document.bind(clickEventName, { component }, component.boundClickoutHandler);
$document.bind(focusEventName, { component }, component.boundClickoutHandler);
Expand Down Expand Up @@ -96,13 +96,13 @@ export default Mixin.create({
let $target = $(event.target);

/* There is an issue when the click triggered a dom change in the
* dropdown that unloaded the target element. The ancestry of the target
* can no longer be determined. We can check if html is still an ancestor
* to determine if this has happened. The safe option then seems to be to
* not close the dropdown, as occasionaly not closing the dropdown when it
* should have closed, seems to be less bad for usability than occasionaly
* closing the dropdown when it should not have closed.
*/
* dropdown that unloaded the target element. The ancestry of the target
* can no longer be determined. We can check if html is still an ancestor
* to determine if this has happened. The safe option then seems to be to
* not close the dropdown, as occasionaly not closing the dropdown when it
* should have closed, seems to be less bad for usability than occasionaly
* closing the dropdown when it should not have closed.
*/
if (
component.get('dropdownExpanded') &&
$target.closest('html').length &&
Expand Down

0 comments on commit 8b1d937

Please sign in to comment.