[wp-trac] [WordPress Trac] #36585: Editor: wptextpattern: space-triggered patterns are unreliable

WordPress Trac noreply at wordpress.org
Fri Apr 22 03:32:55 UTC 2016


#36585: Editor: wptextpattern: space-triggered patterns are unreliable
----------------------------------------+-----------------------------
 Reporter:  jnylen0                     |       Owner:
     Type:  defect (bug)                |      Status:  new
 Priority:  normal                      |   Milestone:  Future Release
Component:  TinyMCE                     |     Version:  4.3
 Severity:  normal                      |  Resolution:
 Keywords:  has-patch needs-unit-tests  |     Focuses:  javascript
----------------------------------------+-----------------------------
Changes (by jnylen0):

 * keywords:  has-patch needs-unit-tests reporter-feedback => has-patch
     needs-unit-tests


Comment:

 Yes, according to my testing (using [http://unixpapa.com/js/testkey.html
 this page] for example) overlapping keypresses are quite common during
 normal/fast typing:

 {{{
 keydown  keyCode=81  (Q)   which=81  (Q)   charCode=0
 keypress keyCode=113 (q)   which=113 (q)   charCode=113 (q)
 keydown  keyCode=85  (U)   which=85  (U)   charCode=0
 keypress keyCode=117 (u)   which=117 (u)   charCode=117 (u)
 keydown  keyCode=73  (I)   which=73  (I)   charCode=0
 keypress keyCode=105 (i)   which=105 (i)   charCode=105 (i)
 keyup    keyCode=81  (Q)   which=81  (Q)   charCode=0
 keyup    keyCode=85  (U)   which=85  (U)   charCode=0
 keyup    keyCode=73  (I)   which=73  (I)   charCode=0
 keydown  keyCode=67  (C)   which=67  (C)   charCode=0
 keypress keyCode=99  (c)   which=99  (c)   charCode=99  (c)
 keydown  keyCode=75  (K)   which=75  (K)   charCode=0
 keypress keyCode=107 (k)   which=107 (k)   charCode=107 (k)
 keyup    keyCode=75  (K)   which=75  (K)   charCode=0
 keyup    keyCode=67  (C)   which=67  (C)   charCode=0
 keydown  keyCode=76  (L)   which=76  (L)   charCode=0
 keypress keyCode=108 (l)   which=108 (l)   charCode=108 (l)
 keydown  keyCode=89  (Y)   which=89  (Y)   charCode=0
 keypress keyCode=121 (y)   which=121 (y)   charCode=121 (y)
 keyup    keyCode=76  (L)   which=76  (L)   charCode=0
 keyup    keyCode=89  (Y)   which=89  (Y)   charCode=0
 }}}

 Thanks for the additional explanation.  Unfortunately that means we'll
 need a smarter approach.  I'll work on an updated patch including tests.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/36585#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list