1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-21 20:27:58 +01:00

Import part of top patch in queue: Add no-op option hive for plugin API reasons, cleanup some related code.

This commit is contained in:
Kris Maglione
2011-08-16 21:17:52 -04:00
parent 01fd946df1
commit 1ad3fdf195
7 changed files with 52 additions and 20 deletions

View File

@@ -463,7 +463,10 @@ var Buffer = Module("buffer", {
else
flags = services.focus.FLAG_SHOWRING;
if (!elem.dactylHadFocus && elem.value && elem.selectionStart == elem.selectionEnd)
if (!elem.dactylHadFocus && elem.value &&
elem instanceof HTMLInputElement &&
elem.selectionStart != null &&
elem.selectionStart == elem.selectionEnd)
elem.selectionStart = elem.selectionEnd = elem.value.length;
dactyl.focus(elem, flags);