Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Issue 29587558: Issue 5868 - Allow clicking outside CustomSelect to close in help.eyeo.com (Closed)

Created:
Oct. 24, 2017, 8:20 a.m. by ire
Modified:
Oct. 24, 2017, 2:51 p.m.
Reviewers:
juliandoucette
Base URL:
https://hg.adblockplus.org/help.eyeo.com
Visibility:
Public.

Description

Issue 5868 - Allow clicking outside CustomSelect to close in help.eyeo.com

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -2 lines) Patch
M includes/layout/footer.tmpl View 1 chunk +1 line, -1 line 0 comments Download
M static/js/main.js View 1 chunk +26 lines, -1 line 2 comments Download

Messages

Total messages: 4
ire
Oct. 24, 2017, 8:20 a.m. (2017-10-24 08:20:49 UTC) #1
ire
Ready for review
Oct. 24, 2017, 8:21 a.m. (2017-10-24 08:21:20 UTC) #2
juliandoucette
LGTM https://codereview.adblockplus.org/29587558/diff/29587559/static/js/main.js File static/js/main.js (right): https://codereview.adblockplus.org/29587558/diff/29587559/static/js/main.js#newcode55 static/js/main.js:55: if (newFocus Suggest: {{{ var classList = document.activeElement.classList; ...
Oct. 24, 2017, 10:15 a.m. (2017-10-24 10:15:25 UTC) #3
ire
Oct. 24, 2017, 2:51 p.m. (2017-10-24 14:51:10 UTC) #4
https://codereview.adblockplus.org/29587558/diff/29587559/static/js/main.js
File static/js/main.js (right):

https://codereview.adblockplus.org/29587558/diff/29587559/static/js/main.js#n...
static/js/main.js:55: if (newFocus
On 2017/10/24 10:15:25, juliandoucette wrote:
> Suggest:
> 
> {{{
> var classList = document.activeElement.classList;
> 
> return classList.contains("custom-select-selected") ||
>   classList.contains("custom-select-option") ||
>   this.close();
> }}}

This particular way doesn't work because I'm not only checking for the
activeElement's class. Also checking for the parentElement of the activeElement.

Powered by Google App Engine
This is Rietveld