Skip to content
This repository was archived by the owner on Mar 13, 2018. It is now read-only.

Conversation

@warnerandy
Copy link
Contributor

Having text become selected while moving the splitter is unwanted behavior. So lets disable text selection while the splitter is moving.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We prefer camel case, e.g. disableSelection

@warnerandy
Copy link
Contributor Author

cool, i'll make the changes

@warnerandy
Copy link
Contributor Author

@frankiefu i've made your changes let me know if there is anything else i need to do

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

disableselection -> disableSelection

remove unneccessary css class

setting the userSelect prop on the parent node not the body
@warnerandy
Copy link
Contributor Author

@frankiefu fixed the tabbing and the missed camelCasing

@frankiefu
Copy link
Contributor

lgtm

frankiefu added a commit that referenced this pull request Jul 9, 2014
@frankiefu frankiefu merged commit 8327b07 into googlearchive:master Jul 9, 2014
@arv
Copy link

arv commented Jul 9, 2014

FWIW, you can achieve the same with preventDefault. See https://chromium.googlesource.com/chromium/src/+/master/ui/webui/resources/js/cr/ui/splitter.js#138

@sjmiles
Copy link

sjmiles commented Jul 9, 2014

Sounds like this control should be built into the tracking gesture.

@arv
Copy link

arv commented Jul 9, 2014

@azakus The preventDefault needs to be done in mousedown. Calling preventDefault in trackstart did not work. I'll have to look into how trackstart is implemented.

@arv
Copy link

arv commented Jul 9, 2014

FWIW, #4

@dfreedm
Copy link
Contributor

dfreedm commented Jul 9, 2014

@arv I imagine that trackstart is probably too late, as it is sent asynchronously, and only after a hysteresis threshold.

@frankiefu
Copy link
Contributor

down doesn't work too. e.g.

on-down="{{preventSelection}}"
...
preventSelection: function(e) {
  e.preventDefault();
}

@arv
Copy link

arv commented Jul 10, 2014

@frankiefu You need to use on-mousedown. See #4. I manually tested it.

@arv
Copy link

arv commented Jul 10, 2014

@azakus Maybe we should move this into PointerGestures repo. preventDefault in down should work, shouldn't it?

@frankiefu
Copy link
Contributor

Thanks @arv for the insight. Also polymer now uses polymer-gestures instead of PointerGestures. I have filed couple issues on polymer-gestures regarding preventDefault in down doesn't work and have disable selection built into tracking gesture:
googlearchive/polymer-gestures#20
googlearchive/polymer-gestures#21

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants