New: triple click selectable text field to select all.

This matches Cocoa behaviour. Cocoa also supports double click to select the current word but we currently don't know what word is being clicked. In some browsers (e.g. Safari) this will work natively. Chrome on the other hand selects something random after double click on a non editable div.
This commit is contained in:
Alexander Ljungberg committed 2013-08-12 16:57:07 +01:00
1 parent 03acecdec9
commit 638d8de472
1 file changed
+9
+9
View File
@@ -896,6 +896,15 @@ CPTextFieldStatePlaceholder = CPThemeState("placeholder");
CPTextFieldCachedSelectStartFunction = nil
CPTextFieldCachedDragFunction = nil;
}
// TODO clickCount === 2 should select the clicked word.
if ([[CPApp currentEvent] clickCount] === 3)
{
[self selectText:nil];
return;
}
return [[[anEvent window] platformWindow] _propagateCurrentDOMEvent:YES];
}
}