Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1010)

Unified Diff: third_party/WebKit/Source/web/resources/listPicker.js

Issue 2373873002: Merge "SELECT popup: Touch input should not be able to select disabled OPTIONs." to M54. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/forms/select-popup/popup-menu-touch-operations-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/resources/listPicker.js
diff --git a/third_party/WebKit/Source/web/resources/listPicker.js b/third_party/WebKit/Source/web/resources/listPicker.js
index c8a66f838c4c191ad9d19bc2c695a174d4a7a61c..575523f27242badb2d64ec452b27e0479a536e93 100644
--- a/third_party/WebKit/Source/web/resources/listPicker.js
+++ b/third_party/WebKit/Source/web/resources/listPicker.js
@@ -169,7 +169,7 @@ ListPicker.prototype._handleWindowTouchEnd = function(event) {
if (!touch)
return;
var target = document.elementFromPoint(touch.clientX, touch.clientY)
- if (target.tagName === "OPTION")
+ if (target.tagName === "OPTION" && !target.disabled)
window.pagePopupController.setValueAndClosePopup(0, this._selectElement.value);
this._exitTouchSelectMode();
};
@@ -183,7 +183,7 @@ ListPicker.prototype._getTouchForId = function (touchList, id) {
};
ListPicker.prototype._highlightOption = function(target) {
- if (target.tagName !== "OPTION" || target.selected)
+ if (target.tagName !== "OPTION" || target.selected || target.disabled)
return;
var savedScrollTop = this._selectElement.scrollTop;
// TODO(tkent): Updating HTMLOptionElement::selected is not efficient. We
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/forms/select-popup/popup-menu-touch-operations-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698