Last Comment Bug 680371 - Source Editor should implement placeholderText differently
: Source Editor should implement placeholderText differently
Status: RESOLVED FIXED
[sourceeditor][good-first-bugs][mento...
:
Product: Firefox
Classification: Client Software
Component: Developer Tools (show other bugs)
: Trunk
: All All
: P3 normal (vote)
: ---
Assigned To: Mihai Sucan [:msucan]
:
:
Mentors:
Depends on: 707987
Blocks:
  Show dependency treegraph
 
Reported: 2011-08-19 01:21 PDT by Cedric Vivier [:cedricv]
Modified: 2012-02-22 12:42 PST (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description Cedric Vivier [:cedricv] 2011-08-19 01:21:24 PDT
Source Editor currently implement placeholderText option like an initialText option rather than the expected placeholder behavior, which is to make the text disappear as soon TextChanged and the editor is not empty (and come back if editor is emptied again).

Perhaps it is not necessary to expose current behavior as a new initialText option since it's as easy (and more flexible) to just use editor.setText(initialText) when editor is ready.
Comment 1 Cedric Vivier [:cedricv] 2011-08-30 09:13:11 PDT
About setText(initialText), it's worthy to note that there seems to be currently no way to programatically set the text without impacting the undo stack.
Comment 2 Mihai Sucan [:msucan] 2011-08-30 11:33:29 PDT
(In reply to Cedric Vivier [cedricv] from comment #1)
> About setText(initialText), it's worthy to note that there seems to be
> currently no way to programatically set the text without impacting the undo
> stack.

That would be a nice new feature to the SourceEditor API. Please open a new bug, since it is a different request. Thanks!
Comment 3 Mihai Sucan [:msucan] 2011-10-07 13:04:48 PDT
This is a nice-to-have change for the Source Editor. Not sure it's a minotaur bug. (feel free to disagree!)
Comment 4 Mihai Sucan [:msucan] 2012-01-27 13:14:18 PST
This is going to be fixed by bug 707987 which makes changes to the SourceEditor options.
Comment 5 Mihai Sucan [:msucan] 2012-02-06 09:47:58 PST
For people following this bug: the patch from bug 707987 renames the Source Editor initialization option "placeholderText" to "initialText" to clear confusion. A placeholder option like in a typical textarea/input does not make much sense in a code editor - if you think it does, please open a new bug as this one will be closed when bug 707987 lands. Thank you!
Comment 6 Mihai Sucan [:msucan] 2012-02-22 12:42:18 PST
Bug 707987 landed and placeholderText is no more, confusion cleared, bug fixed. Thanks for the report Cedric!

Note You need to log in before you can comment on or make changes to this bug.