-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevents the row from being selected when clicked on an i-tag #1480
Conversation
Fixes: OX-11094
if (event.target.tagName.toLowerCase() !== 'input' && | ||
event.target.tagName.toLowerCase() !== 'a' && | ||
event.target.tagName.toLowerCase() !== 'i' && | ||
event.target.tagName.toLowerCase() !== 'button') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it be better to maintain a whitelist or use a marker class that possible click-targets get assigned?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, it would be nice to know why particularly <i>
tags in particular are supposed to be exempt? Why not <b>
tags? Or <span>
tags? To me, the entire PR lacks justification. (Not saying that it is not justified, but there is no reasoning.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Icons are often wrapped in <i>
-tags. If you add an <a>
which has an <i>
inside and you manage to click directly on the <i>
(or the icon) you would select the row. In this case however the intention was to click on the <a>
-button.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it be better to maintain a whitelist or use a marker class that possible click-targets get assigned?
I see what you mean. I will look into it if I have spare time if thats ok for you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Icons are often wrapped in
<i>
-tags. If you add an<a>
which has an<i>
inside and you manage to click directly on the<i>
(or the icon) you would select the row. In this case however the intention was to click on the<a>
-button.
In case of FA, the <i>
tag only serves as a marker and is replaced by a <svg>
tag if i am not wrong.
Merged because This PR just extends the current mechanism. Obvoiusly we need to rework the mechansim but there is currently no time for that since we are close the release. |
Additional Notes
Checklist