mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-18 14:31:18 +00:00
Overwrite selected tokens by typing support.
If tokens are selected in `CPTokenField` and new text is entered, the selected tokens are overwritten by the newly entered text.
This commit is contained in:
1 parent
19b53746cf
commit
d5918157ff
1 file changed
+8
@@ -699,6 +699,14 @@ var CPScrollDestinationNone = 0,
|
||||
}
|
||||
else
|
||||
{
|
||||
// If you type something while tokens are selected, overwrite them.
|
||||
if (_selectedRange.length)
|
||||
{
|
||||
[self _removeSelectedTokens:self];
|
||||
// Make sure the editor is placed so it can capture the characters we're overwriting with.
|
||||
[self layoutSubviews];
|
||||
}
|
||||
|
||||
// If we didn't handle it, allow _propagateCurrentDOMEvent the input field to receive
|
||||
// the new character.
|
||||
|
||||
|
||||
Reference in new issue
Block a user