mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-04 16:12:58 +00:00
Fixed: When triple click in an empty CPTextField that is not editable but selectable this call will crash as _DOMTextElement is nil.
This check will make sure it is not called when no element is present. This is the same way as it is done in other parts of this class.
This commit is contained in:
1 parent
32059c376e
commit
033221fd01
1 file changed
+2
-1
@@ -836,7 +836,8 @@ var _CPimageAndTextViewFrameSizeChangedFlag = 1 << 0,
|
||||
- (void)setSelectedRange:(CPRange)aRange
|
||||
{
|
||||
#if PLATFORM(DOM)
|
||||
[[[self window] platformWindow] setSelectedRange:aRange inElement:_DOMTextElement];
|
||||
if (_DOMTextElement)
|
||||
[[[self window] platformWindow] setSelectedRange:aRange inElement:_DOMTextElement];
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user