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

Custom field (formula) and custom expression forms are broken #4906

Closed
luxemate opened this issue Apr 28, 2017 · 11 comments
Closed

Custom field (formula) and custom expression forms are broken #4906

luxemate opened this issue Apr 28, 2017 · 11 comments
Assignees
Labels
Priority:P1 Security holes w/o exploit, crashing, setup/upgrade, login, broken common features, correctness Type:Bug Product defects
Milestone

Comments

@luxemate
Copy link

It's not possible to move cursor in Field Formula input as it instantly moves back to start position. It also doesn't offer me to choose an operation (+,- etc.), unlike Chrome in Windows does. In Chrome it's not even possible to blur from Field Formula input.

image

Warnings and errors in Chrome console:
image

  • Your browser and the version: Chrome 58.0, Firefox 53.0
  • Your operating system: Ubuntu Linux 16.04.2 LTS
  • Your databases: Postgres
  • Metabase version: 0.23.1
  • Metabase hosting environment: JAR
  • Metabase internal database: H2 (default)
@LukeAbell
Copy link

LukeAbell commented Apr 28, 2017

Same issue here. Chrome on OSX.

@mazameli
Copy link
Contributor

Oh yikes, yeah. Here I've tried to write the word runs but the cursor moves back to the start after each key press, rendering the word backwards:

screen shot 2017-04-28 at 10 31 04 am

@mazameli mazameli added the Type:Bug Product defects label Apr 28, 2017
@mazameli mazameli changed the title Custom field (formula) form is broken in linux Custom field (formula) form is broken Apr 28, 2017
@mazameli
Copy link
Contributor

Motion to add this to 0.24. It seems like a feature-breaking bug.

@salsakran salsakran added Query Builder Priority:P1 Security holes w/o exploit, crashing, setup/upgrade, login, broken common features, correctness labels Apr 28, 2017
@salsakran salsakran added this to the 0.24.0 milestone Apr 28, 2017
@mazameli mazameli changed the title Custom field (formula) form is broken Custom field (formula) and custom expression forms are broken May 1, 2017
@VikramTiwari
Copy link
Contributor

VikramTiwari commented May 1, 2017

@mazameli I would argue that this is a hotfix that should go out as 0.23.2. Even if it's not a hotfix issue for the project, it's a bug that everyone will run into as their browsers get updated and a working release is breaking.

Also, confirming that this is not happening on Mac app.

@kdoh
Copy link
Member

kdoh commented May 1, 2017

So after a bit of digging, it seems that in Chrome / FF the cursor position is always getting set to 0, 0 on every key press which is why things end up getting rendered backwards and the cursor can't ever leave the initial position.

I haven't been able to figure out exactly why that's happening specifically in those browsers and not in Safari (and therefore the mac app) yet though.

@tlrobinson tlrobinson self-assigned this May 3, 2017
@tlrobinson
Copy link
Contributor

I was able to reduce it down to this: https://jsfiddle.net/tlrobinson/wryfspsq/

When you have an empty input and enter a character, in Safari you get:

onSelectionChange 1
onSelectionChange 1
onSelectionChange 1

Whereas in Chrome 58 you get:

onSelectionChange 1
onSelectionChange 1
onSelectionChange 0
onSelectionChange 0
onSelectionChange 0
onSelectionChange 0

Haven't figured out anything beyond this yet.

@salsakran
Copy link
Contributor

is this a bug in Chrome/FF or just a new behaviour? i.e. if we wait it out, will it get fixed on its own?

@tlrobinson
Copy link
Contributor

Unclear because I'm not sure what the root cause is yet, but given it's happening in both FF and Chrome it seems like it's probably something we should fix.

@tlrobinson
Copy link
Contributor

Also do we know if it ever worked on Firefox?

@VikramTiwari
Copy link
Contributor

Not working on Firefox 49.0 not even on 53.0 (64-bit, Latest).

@tlrobinson
Copy link
Contributor

@luxemate @LukeAbell @VikramTiwari I've got a fix for this in #4969, if you'd like to try it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority:P1 Security holes w/o exploit, crashing, setup/upgrade, login, broken common features, correctness Type:Bug Product defects
Projects
None yet
Development

No branches or pull requests

7 participants