Repository navigation
Added find-in-page definitions - #5770
Conversation
|
Thanks! I'm happy to give some editorial feedback, but I think first we should change up the structure a bit. In general, defining something that isn't referenced is bad. So we want to weave these into a handwavey narrative description of the feature, instead of having them be standalone definitions. I think this can be accomplished with a minimal modification of what you have here. Basically, instead of bullet points, use paragraphs. And add lots of cross-references, so that it's clear how they relate. For example:
... Questions:
|
|
Thanks for the suggestions! It makes a lot of sense to change it. I'll update it.
Yeah that makes sense. I think I can just describe this in abstract terms and say as an example, it can be as simple as a string?
I'm not sure. It makes sense to me, but I'm also weary of writing something down that makes existing implementations not quite spec compliant. I do think it's OK to do as ranges.
If there is a match, then there's always an active match (at least in my tests). I think it makes sense to spec that. Of course, if there is no match at all then there is no active match, so (pedantically speaking) not every find-in-page results in an active match. |
|
PTAL, let me know if this is what you meant by structure changes. |
|
This looks great! Some minor points:
And one more substantial point:
|
I think this one specifically is a bit tricky, since the browsers currently disagree. I know that Firefox does affect selection as you type a query. In Chrome, however, the selection only changes if you dismiss a find-in-page interface, in which case the last active match becomes selected. Would stating this using "may" language normatively be sufficient? Ie something along the lines of "Active match may also cause I do think calling out the interplay between find-in-page and selection is important, and I will do that, I just think it's hard to mandate specific behavior since the existing behavior is not the same across browsers. |
|
PTAL |
26ee877 to
b581596
Compare
|
This is looking good. I pushed some editorial changes (e.g. casing, wrapping, updating the link IDs generated by I think we should be more lenient about the interaction with selection, if things are currently not interoperable. In particular, I don't think we have a goal of converging everyone's behavior here, since it is untestable and cannot cause interop problems (right?). That is, I don't think it's possible to distinguish between update-on-dismissal and update-while-you-type; people could just type a character, dismiss the UI, reopen the UI, type a second character, etc. to get the same behavior as update-while-you-type. So in particular the current phrasing seems contradictory:
The first sentence seems to mandate on-dismissal, whereas the second seems to allow as-you-type. I think we should instead make a more vague, saying something like how the active match will be tied to the current selection, but selection may update at a different time than the active match updates, e.g. only upon dismissal. Or something. You've been coming up with great phrasing so far, so I'll leave that to you :). |
|
I did, sorry, I was confusing different issues I was recently looking at! If you could update that box while you're there that'd be great. |
|
PTAL, I think it reads a bit better albeit a bit vaguer :P which was the intent. |
This patch documents find-in-page, which is an existing behavior in major browsers.
The PR defines some commonly used terms which are helpful to reference in other parts of the spec
Please see #3539 for further details.
/browsers.html ( diff )
/dnd.html ( diff )
/index.html ( diff )
/infrastructure.html ( diff )
/interaction.html ( diff )
/offline.html ( diff )
/rendering.html ( diff )
/web-messaging.html ( diff )
/webappapis.html ( diff )
/webstorage.html ( diff )
/workers.html ( diff )