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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/ui/TextPrompt.js

Issue 2907553004: DevTools: Avoid typing into ghost text in TextPrompt (Closed)
Patch Set: Created 3 years, 7 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 | « 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 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2011 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 27 matching lines...) Expand all
38 */ 38 */
39 this._proxyElement; 39 this._proxyElement;
40 this._proxyElementDisplay = 'inline-block'; 40 this._proxyElementDisplay = 'inline-block';
41 this._autocompletionTimeout = UI.TextPrompt.DefaultAutocompletionTimeout; 41 this._autocompletionTimeout = UI.TextPrompt.DefaultAutocompletionTimeout;
42 this._title = ''; 42 this._title = '';
43 this._queryRange = null; 43 this._queryRange = null;
44 this._previousText = ''; 44 this._previousText = '';
45 this._currentSuggestion = ''; 45 this._currentSuggestion = '';
46 this._completionRequestId = 0; 46 this._completionRequestId = 0;
47 this._ghostTextElement = createElementWithClass('span', 'auto-complete-text' ); 47 this._ghostTextElement = createElementWithClass('span', 'auto-complete-text' );
48 this._ghostTextElement.setAttribute('contenteditable', 'false');
48 } 49 }
49 50
50 /** 51 /**
51 * @param {(function(string, string, boolean=):!Promise<!UI.SuggestBox.Suggest ions>)} completions 52 * @param {(function(string, string, boolean=):!Promise<!UI.SuggestBox.Suggest ions>)} completions
52 * @param {string=} stopCharacters 53 * @param {string=} stopCharacters
53 */ 54 */
54 initialize(completions, stopCharacters) { 55 initialize(completions, stopCharacters) {
55 this._loadCompletions = completions; 56 this._loadCompletions = completions;
56 this._completionStopCharacters = stopCharacters || ' =:[({;,!+-*/&|^<>.'; 57 this._completionStopCharacters = stopCharacters || ' =:[({;,!+-*/&|^<>.';
57 } 58 }
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 return this._proxyElement || null; 630 return this._proxyElement || null;
630 } 631 }
631 }; 632 };
632 633
633 UI.TextPrompt.DefaultAutocompletionTimeout = 250; 634 UI.TextPrompt.DefaultAutocompletionTimeout = 250;
634 635
635 /** @enum {symbol} */ 636 /** @enum {symbol} */
636 UI.TextPrompt.Events = { 637 UI.TextPrompt.Events = {
637 TextChanged: Symbol('TextChanged') 638 TextChanged: Symbol('TextChanged')
638 }; 639 };
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