summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-18 04:10:55 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-18 04:10:55 +0000
commit997c0764097b615db20cd36eb0c8279666fd167d (patch)
treec3c5a118ec1d9d93efce648c160f17cbc8faa3da /chrome
parentf7202243cde840bf2a327728d387a534cbb278eb (diff)
downloadchromium_src-997c0764097b615db20cd36eb0c8279666fd167d.zip
chromium_src-997c0764097b615db20cd36eb0c8279666fd167d.tar.gz
chromium_src-997c0764097b615db20cd36eb0c8279666fd167d.tar.bz2
Revert 101652 (speculative revert; reliability went red after
this went in. Reliability is win, and this CL is cros, so chances are I can revert the revert soon, but let's give it a try.) - [cros] Disable text selection/dragging in mobile dialogs. BUG=chromium-os:17501 TEST=Manual Review URL: http://codereview.chromium.org/7901013 TBR=nkostylev@chromium.org Review URL: http://codereview.chromium.org/7936001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101688 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/resources/chromeos/choose_mobile_network.js2
-rw-r--r--chrome/browser/resources/chromeos/login/oobe.js10
-rw-r--r--chrome/browser/resources/chromeos/sim_unlock.js2
-rw-r--r--chrome/browser/resources/shared/js/util.js15
4 files changed, 9 insertions, 20 deletions
diff --git a/chrome/browser/resources/chromeos/choose_mobile_network.js b/chrome/browser/resources/chromeos/choose_mobile_network.js
index 606ee87..cb163c2 100644
--- a/chrome/browser/resources/chromeos/choose_mobile_network.js
+++ b/chrome/browser/resources/chromeos/choose_mobile_network.js
@@ -116,5 +116,3 @@ document.addEventListener('DOMContentLoaded', function () {
ChooseNetwork.initialize();
});
-
-disableTextSelectAndDrag();
diff --git a/chrome/browser/resources/chromeos/login/oobe.js b/chrome/browser/resources/chromeos/login/oobe.js
index 26243789..bc1d461 100644
--- a/chrome/browser/resources/chromeos/login/oobe.js
+++ b/chrome/browser/resources/chromeos/login/oobe.js
@@ -595,6 +595,14 @@ cr.define('cr.ui', function() {
var Oobe = cr.ui.Oobe;
-disableTextSelectAndDrag();
+// Disable text selection.
+document.onselectstart = function(e) {
+ e.preventDefault();
+}
+
+// Disable dragging.
+document.ondragstart = function(e) {
+ e.preventDefault();
+}
document.addEventListener('DOMContentLoaded', cr.ui.Oobe.initialize);
diff --git a/chrome/browser/resources/chromeos/sim_unlock.js b/chrome/browser/resources/chromeos/sim_unlock.js
index 22c4dd1..3d64aa8 100644
--- a/chrome/browser/resources/chromeos/sim_unlock.js
+++ b/chrome/browser/resources/chromeos/sim_unlock.js
@@ -415,5 +415,3 @@ cr.define('mobile', function() {
};
});
-
-disableTextSelectAndDrag(); \ No newline at end of file
diff --git a/chrome/browser/resources/shared/js/util.js b/chrome/browser/resources/shared/js/util.js
index 24a30f1..8956f7b 100644
--- a/chrome/browser/resources/shared/js/util.js
+++ b/chrome/browser/resources/shared/js/util.js
@@ -108,21 +108,6 @@ function swapDomNodes(a, b) {
aParent.insertBefore(b, afterA);
}
-/**
- * Disables text selection and dragging.
- */
-function disableTextSelectAndDrag() {
- // Disable text selection.
- document.onselectstart = function(e) {
- e.preventDefault();
- }
-
- // Disable dragging.
- document.ondragstart = function(e) {
- e.preventDefault();
- }
-}
-
// Handle click on a link. If the link points to a chrome: or file: url, then
// call into the browser to do the navigation.
document.addEventListener('click', function(e) {