Open BalGuldur opened 7 years ago
I know what you mean, but actually I just want to toggle the modal when clicking on the preview panel. I think it's reasonable. Anyway, thanks a lot for your advice.
Maybe I could make this behavior configurable. 😃
Mmm. Maybe i don't understand. But u live demo (https://domonji.github.io/vue-clock-picker/) work prefect as need, and click on preview panel -> toggle modal with clock. But version on master branch and npm package don't toggle modal with clock by click on preview panel. Becourse click on preview panel runing two handler: toggleFocus() on preview panel and onOutsideClickHandler() on OutsideClickHandler. (area of preview panel is outside for OutsideClickHandler and OutsideClickHandler is focused (changed by toggleFocus()) ) Anyway, thx for this project, it's good. Thx if u fix this, or add configurable props. Second way for fix this, is expand OutsideClickHandler to preview panel + modal.
P.S. if need, i can create version with autoswitch from hour to minutes on choose hour, and close modal on choose minutes, and add pull request.
That's strange. I remember I built this live demo with master branch. However, I'll test it and find out what is going wrong.
It would be very nice if you add pull requests.
Don't open modal becourse click on time-picker run two function: toggleFocus() and onClearFocus() becourse element OutsideClickHandler catch this click as outside click. toggleFocus() - open modal then onClearFocus() close modal. I think need add overElement data for TimePicker(), add
@mouseover="overElement=true" @mouseout="overElement=false"
to time-picker-preview, and change onClearFocus() to: