Commit 7d6f04d4 authored by Esmael El-Moslimany's avatar Esmael El-Moslimany Committed by Commit Bot

Settings: cr-expand-button, use pointer cursor for label

The label when clicked toggles expansion. The bug as reported was
selecting the label text causes expansion. Without the pointer cursor
it's surprising to the user that an action will be taken while clicking
on the label text during selection. The problem is the surprising
expansion and not the expansion on clicking the text.

Bug: 870205
Change-Id: I5c5200f54a54bba50cb6fc67c668b8d298b98c94
Reviewed-on: https://chromium-review.googlesource.com/1166216Reviewed-by: default avatarScott Chen <scottchen@chromium.org>
Reviewed-by: default avatarHector Carmona <hcarmona@chromium.org>
Commit-Queue: Esmael El-Moslimany <aee@chromium.org>
Cr-Commit-Position: refs/heads/master@{#582755}
parent 0f2805cb
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
flex: 1; flex: 1;
} }
</style> </style>
<div id="outer"> <div id="outer" actionable>
<div id="label"><slot></slot></div> <div id="label"><slot></slot></div>
<paper-icon-button-light class$="[[iconName_(expanded)]]"> <paper-icon-button-light class$="[[iconName_(expanded)]]">
<button disabled="[[disabled]]" aria-label$="[[alt]]" <button disabled="[[disabled]]" aria-label$="[[alt]]"
......
...@@ -54,7 +54,6 @@ Polymer({ ...@@ -54,7 +54,6 @@ Polymer({
return expanded ? 'true' : 'false'; return expanded ? 'true' : 'false';
}, },
/** /**
* @param {boolean} expanded * @param {boolean} expanded
* @private * @private
...@@ -111,6 +110,9 @@ Polymer({ ...@@ -111,6 +110,9 @@ Polymer({
* @private * @private
*/ */
updateRippleHoldDown_: function(holdDown) { updateRippleHoldDown_: function(holdDown) {
this.$$('paper-ripple').holdDown = holdDown; const button = /** @type {{ensureRipple: Function, getRipple: Function}} */
(this.$$('paper-icon-button-light'));
button.ensureRipple();
button.getRipple().holdDown = holdDown;
}, },
}); });
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment