Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(278)

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

Can't Edit
Can't Publish+Mail
Start Review
Created:
1 year, 10 months ago by ire
Modified:
1 year, 10 months ago
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
1 year, 10 months ago (2017-10-24 08:20:49 UTC) #1
ire
Ready for review
1 year, 10 months ago (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; ...
1 year, 10 months ago (2017-10-24 10:15:25 UTC) #3
ire
1 year, 10 months ago (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.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld 87257f5