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

Side by Side Diff: chrome/browser/resources/options/options_page.js

Issue 6371009: Fix the breakage of radio/checkbox click handling on settings overlay. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 cr.define('options', function() { 5 cr.define('options', function() {
6 ///////////////////////////////////////////////////////////////////////////// 6 /////////////////////////////////////////////////////////////////////////////
7 // OptionsPage class: 7 // OptionsPage class:
8 8
9 /** 9 /**
10 * Base class for options page. 10 * Base class for options page.
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 * @param {number} level The level of the subpage being handled. 356 * @param {number} level The level of the subpage being handled.
357 * @return {Function} a function to handle clicks outside the given subpage. 357 * @return {Function} a function to handle clicks outside the given subpage.
358 * @private 358 * @private
359 */ 359 */
360 OptionsPage.subPageClosingClickHandler_ = function(level) { 360 OptionsPage.subPageClosingClickHandler_ = function(level) {
361 var self = this; 361 var self = this;
362 return function(event) { 362 return function(event) {
363 // Clicks on the narrow strip between the left of the subpage sheet and 363 // Clicks on the narrow strip between the left of the subpage sheet and
364 // that shows part of the parent page should close the overlay, but 364 // that shows part of the parent page should close the overlay, but
365 // not fall through to the parent page. 365 // not fall through to the parent page.
366 if (!$('subpage-sheet-' + level).contains(event.target)) 366 if (!$('subpage-sheet-' + level).contains(event.target)) {
367 self.closeSubPagesToLevel(level - 1); 367 self.closeSubPagesToLevel(level - 1);
368 event.stopPropagation(); 368 event.stopPropagation();
369 event.preventDefault(); 369 event.preventDefault();
370 }
370 }; 371 };
371 }; 372 };
372 373
373 /** 374 /**
374 * A function to handle mouse events (mousedown or click) on the html body by 375 * A function to handle mouse events (mousedown or click) on the html body by
375 * closing subpages and/or stopping event propagation. 376 * closing subpages and/or stopping event propagation.
376 * @return {Event} a mousedown or click event. 377 * @return {Event} a mousedown or click event.
377 * @private 378 * @private
378 */ 379 */
379 OptionsPage.bodyMouseEventHandler_ = function(event) { 380 OptionsPage.bodyMouseEventHandler_ = function(event) {
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 OptionsPage.showOverlay(hash); 575 OptionsPage.showOverlay(hash);
575 }, 576 },
576 }; 577 };
577 578
578 // Export 579 // Export
579 return { 580 return {
580 OptionsPage: OptionsPage 581 OptionsPage: OptionsPage
581 }; 582 };
582 583
583 }); 584 });
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698