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

Side by Side Diff: go-back-with-backspace/is_editable.js

Issue 2325963003: Add options and a browser-action popup. (Closed) Base URL: https://chromium.googlesource.com/chromium/extensions-by-google.git@master
Patch Set: Response to comments 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 unified diff | Download patch
« no previous file with comments | « go-back-with-backspace/installed.html ('k') | go-back-with-backspace/manifest.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 Google Inc. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
1 // Determine whether focus is in an editable text field. 5 // Determine whether focus is in an editable text field.
2 function isEditable(target) { 6 function isEditable(target) {
3 // Elements may be explicitly marked as editable. 7 // Elements may be explicitly marked as editable.
4 if (target.isContentEditable) 8 if (target.isContentEditable)
5 return true; 9 return true;
6 10
7 // Entire documents may be editable. 11 // Entire documents may be editable.
8 if (target.ownerDocument.designMode.toLowerCase() === 'on') 12 if (target.ownerDocument.designMode.toLowerCase() === 'on')
9 return true; 13 return true;
10 14
(...skipping 26 matching lines...) Expand all
37 if (userModify === 'read-write' || 41 if (userModify === 'read-write' ||
38 userModify === 'write-only' || 42 userModify === 'write-only' ||
39 userModify === 'read-write-plaintext-only') { 43 userModify === 'read-write-plaintext-only') {
40 return true; 44 return true;
41 } 45 }
42 } 46 }
43 target = target.parentNode || null; 47 target = target.parentNode || null;
44 } 48 }
45 return false; 49 return false;
46 } 50 }
OLDNEW
« no previous file with comments | « go-back-with-backspace/installed.html ('k') | go-back-with-backspace/manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698