[wp-trac] [WordPress Trac] #42042: Permalink structure tags are sometimes added to the front the of the structure

WordPress Trac noreply at wordpress.org
Mon Oct 23 20:38:49 UTC 2017


#42042: Permalink structure tags are sometimes added to the front the of the
structure
--------------------------+------------------------------------------------
 Reporter:  ocean90       |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  4.9
Component:  Permalinks    |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:  ui, accessibility, administration
  needs-refresh           |
--------------------------+------------------------------------------------

Comment (by swissspidy):

 That makes sense.

 I thought I had something like this in place during development of the
 feature, maybe I forgot about it.

 Replying to [comment:7 afercia]:
 > I think a new condition needs to be added here:
 >
 > {{{
 > // Input field never had focus, move selection to end of input.
 > if ( ! permalinkStructureFocused && 0 === selectionStart && 0 ===
 selectionEnd ) {
 >       selectionStart = selectionEnd = permalinkStructureValue.length;
 > }
 > }}}
 >
 > to check for:
 > - if the input fields gets blurred and `selectionStart` and
 `selectionEnd` are 0, then append to the end. //cc @swissspidy
 >

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


More information about the wp-trac mailing list