Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should Device-Specific Edit Events say what Device-Independent Edit Event they will cause? #25

Closed
BenjamP opened this issue Dec 10, 2014 · 4 comments

Comments

@BenjamP
Copy link

BenjamP commented Dec 10, 2014

From MS Office Team

@BenjamP
Copy link
Author

BenjamP commented Jan 28, 2015

This is the best way to do feature detection and tell if a device-specific (DS) event is going to cause a DI event. Without this I don't know how a site could trust that a DI Event would happen and not just invoke behavior on DS events.

@BenjamP BenjamP modified the milestones: V1.1, V1.0 Feb 23, 2015
@BenjamP BenjamP closed this as completed Feb 23, 2015
@BenjamP BenjamP reopened this Feb 23, 2015
@chaals
Copy link

chaals commented Jun 3, 2015

Device-specific input events should say what behaviour they trigger. But for authors using them, they presumably want to define the behaviour in case the DI event isn't really handled.

onSomeDeviceAction(evt) {
if (responsiveEvent)
fireResponsiveEvent(theOneIwant);
else
doTheResponsiveEventThingManually(evt);
}

The benefit to the author being that the platform implementation is likely more efficient?

The drawback being a mess of testing and figuring out if implementations really do what they claim. But how else do we get "casual" authors there from here?

@johanneswilm
Copy link
Contributor

The question is a bit here what event we will be looking at. Say we have a user who triple clicks on some text which on Windows/Linux causes that paragraph to be selected. The device independent event will be "paragraph selection". But what will the device specific event be? Will it simply be three consecutive clicking events which combined with some JS-based checking where exactly the caret was at the time?

For good feature detection in JS, will this not mean that one needs to reimplement a lot of logic that is already present in the browser?

I am wondering about whether there are other ways of doing this -- for example for the browser to give back a list of all the device independent events that will be triggered by some action, possibly with a list of actions that cause this event. If the paragraph selection event is not implemented at all or it is triggered only by other types of events that do not include triple clicking, the JS editor developers may decide to implement it themselves.

@johanneswilm johanneswilm modified the milestones: V2, V1.0 Aug 25, 2015
@johanneswilm johanneswilm changed the title Should Device-Specific Input Events say what Responsive Input Event they will cause? Should Device-Specific Edit Events say what Device-Independent Edit Event they will cause? Aug 25, 2015
@johanneswilm
Copy link
Contributor

This issue was moved to w3c/input-events#13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants