mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-12-04 03:44:58 +00:00
Don't make space for editing in token field if tokens are selected.
If the editor is placed while there is a token selection it can cause the token view to become scrollable to a white area at the bottom even that there is no editing cursor. And even if the editor is not at the bottom, the empty space made for the editor makes no sense when no editing cursor is visible.
This commit is contained in:
1 parent
d5918157ff
commit
44b609f604
1 file changed
+2
-2
@@ -999,7 +999,7 @@ var CPScrollDestinationNone = 0,
|
||||
|
||||
for (var i = 0, count = [tokens count]; i < count; i++)
|
||||
{
|
||||
if (isEditing && i == _CPMaxRange(_selectedRange))
|
||||
if (isEditing && !_selectedRange.length && i == _CPMaxRange(_selectedRange))
|
||||
placeEditor(false);
|
||||
|
||||
var tokenView = [tokens objectAtIndex:i];
|
||||
@@ -1018,7 +1018,7 @@ var CPScrollDestinationNone = 0,
|
||||
[tokenView setFrame:tokenFrame];
|
||||
}
|
||||
|
||||
if (isEditing && _CPMaxRange(_selectedRange) >= [tokens count])
|
||||
if (isEditing && !_selectedRange.length && _CPMaxRange(_selectedRange) >= [tokens count])
|
||||
placeEditor(true);
|
||||
|
||||
// Hide the editor if there are selected tokens, but still keep it active
|
||||
|
||||
Reference in new issue
Block a user